From 82e2272fca42f956bbcc3d6e376a50e17ec9c120 Mon Sep 17 00:00:00 2001 From: terrytangyuan Date: Mon, 14 Sep 2015 11:24:35 -0400 Subject: [PATCH] TST: More thorough test to check correctness of to_html_unicode --- pandas/tests/test_format.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pandas/tests/test_format.py b/pandas/tests/test_format.py index 6c92bb7095d8b..d6abb00e55e7b 100644 --- a/pandas/tests/test_format.py +++ b/pandas/tests/test_format.py @@ -521,11 +521,12 @@ def test_to_html_with_empty_string_label(self): self.assertTrue("rowspan" not in res) def test_to_html_unicode(self): - # it works! df = DataFrame({u('\u03c3'): np.arange(10.)}) - df.to_html() + expected = u'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\u03c3
00
11
22
33
44
55
66
77
88
99
' + self.assertEqual(df.to_html(), expected) df = DataFrame({'A': [u('\u03c3')]}) - df.to_html() + expected = u'\n \n \n \n \n \n \n \n \n \n \n \n \n
A
0\u03c3
' + self.assertEqual(df.to_html(), expected) def test_to_html_escaped(self): a = 'str