File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -521,11 +521,12 @@ def test_to_html_with_empty_string_label(self):
521
521
self .assertTrue ("rowspan" not in res )
522
522
523
523
def test_to_html_unicode (self ):
524
- # it works!
525
524
df = DataFrame ({u ('\u03c3 ' ): np .arange (10. )})
526
- df .to_html ()
525
+ expected = u'<table border="1" class="dataframe">\n <thead>\n <tr style="text-align: right;">\n <th></th>\n <th>\u03c3 </th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>0</td>\n </tr>\n <tr>\n <th>1</th>\n <td>1</td>\n </tr>\n <tr>\n <th>2</th>\n <td>2</td>\n </tr>\n <tr>\n <th>3</th>\n <td>3</td>\n </tr>\n <tr>\n <th>4</th>\n <td>4</td>\n </tr>\n <tr>\n <th>5</th>\n <td>5</td>\n </tr>\n <tr>\n <th>6</th>\n <td>6</td>\n </tr>\n <tr>\n <th>7</th>\n <td>7</td>\n </tr>\n <tr>\n <th>8</th>\n <td>8</td>\n </tr>\n <tr>\n <th>9</th>\n <td>9</td>\n </tr>\n </tbody>\n </table>'
526
+ self .assertEqual (df .to_html (), expected )
527
527
df = DataFrame ({'A' : [u ('\u03c3 ' )]})
528
- df .to_html ()
528
+ expected = u'<table border="1" class="dataframe">\n <thead>\n <tr style="text-align: right;">\n <th></th>\n <th>A</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>\u03c3 </td>\n </tr>\n </tbody>\n </table>'
529
+ self .assertEqual (df .to_html (), expected )
529
530
530
531
def test_to_html_escaped (self ):
531
532
a = 'str<ing1 &'
You can’t perform that action at this time.
0 commit comments