Skip to content

Commit 209fb0b

Browse files
author
y-p
committed
TST: MultiIndex repr should properly encode unicode labels
1 parent 51877c8 commit 209fb0b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/tests/test_index.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,6 +1675,10 @@ def test_tolist(self):
16751675
exp = list(self.index.values)
16761676
self.assertEqual(result, exp)
16771677

1678+
def test_repr_with_unicode_data(self):
1679+
d={"a":[u"\u05d0",2,3],"b":[4,5,6],"c":[7,8,9]}
1680+
index=pd.DataFrame(d).set_index(["a","b"]).index
1681+
self.assertFalse("\\u" in repr(index)) # we don't want unicode-escaped
16781682

16791683
def test_get_combined_index():
16801684
from pandas.core.index import _get_combined_index

0 commit comments

Comments
 (0)