Skip to content

Commit

Permalink
Py2 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAugspurger committed Feb 8, 2018
1 parent fbf0a06 commit b20e12c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pandas/tests/extension_arrays/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
"'<class 'int'>'")
"'<.* 'int'>'")

with tm.assert_raises_regex(ValueError, xpr):
arr.astype(int)

0 comments on commit b20e12c

Please sign in to comment.