diff --git a/pandas/tests/extension_arrays/test_common.py b/pandas/tests/extension_arrays/test_common.py index 7feb7fdf09ec6..f19754482b04f 100644 --- a/pandas/tests/extension_arrays/test_common.py +++ b/pandas/tests/extension_arrays/test_common.py @@ -27,8 +27,10 @@ def test_astype(): def test_astype_raises(): arr = DummyArray(np.array([1, 2, 3])) + # type int for py2 + # class int for py3 xpr = ("DummyArray can only be coerced to 'object' dtype, not " - "''") + "'<.* 'int'>'") with tm.assert_raises_regex(ValueError, xpr): arr.astype(int)