Skip to content

Commit 9cd83ff

Browse files
committed
Safely raise errors when object contains unicode
This safely turns nd.array objects that contain unicode into a representation that can be printed
1 parent 6eda77e commit 9cd83ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/util/testing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,11 +989,11 @@ def assert_categorical_equal(left, right, check_dtype=True,
989989

990990
def raise_assert_detail(obj, message, left, right, diff=None):
991991
if isinstance(left, np.ndarray):
992-
left = pprint_thing(left)
992+
left = repr(pprint_thing(left))
993993
elif is_categorical_dtype(left):
994994
left = repr(left)
995995
if isinstance(right, np.ndarray):
996-
right = pprint_thing(right)
996+
right = repr(pprint_thing(right))
997997
elif is_categorical_dtype(right):
998998
right = repr(right)
999999

0 commit comments

Comments
 (0)