@@ -138,7 +138,7 @@ def test_eng_float_formatter(self):
138
138
139
139
fmt .set_eng_float_format (accuracy = 0 )
140
140
repr (self .frame )
141
- self .reset_display_options ()
141
+ tm .reset_display_options ()
142
142
143
143
def test_show_null_counts (self ):
144
144
@@ -1197,7 +1197,7 @@ def test_to_string_line_width_no_index(self):
1197
1197
self .assertEqual (df_s , expected )
1198
1198
1199
1199
def test_to_string_float_formatting (self ):
1200
- self .reset_display_options ()
1200
+ tm .reset_display_options ()
1201
1201
fmt .set_option ('display.precision' , 5 , 'display.column_space' , 12 ,
1202
1202
'display.notebook_repr_html' , False )
1203
1203
@@ -1226,7 +1226,7 @@ def test_to_string_float_formatting(self):
1226
1226
expected = (' x\n ' '0 3234.000\n ' '1 0.253' )
1227
1227
self .assertEqual (df_s , expected )
1228
1228
1229
- self .reset_display_options ()
1229
+ tm .reset_display_options ()
1230
1230
self .assertEqual (get_option ("display.precision" ), 6 )
1231
1231
1232
1232
df = DataFrame ({'x' : [1e9 , 0.2512 ]})
@@ -1310,14 +1310,14 @@ def test_to_string_index_formatter(self):
1310
1310
self .assertEqual (rs , xp )
1311
1311
1312
1312
def test_to_string_left_justify_cols (self ):
1313
- self .reset_display_options ()
1313
+ tm .reset_display_options ()
1314
1314
df = DataFrame ({'x' : [3234 , 0.253 ]})
1315
1315
df_s = df .to_string (justify = 'left' )
1316
1316
expected = (' x \n ' '0 3234.000\n ' '1 0.253' )
1317
1317
self .assertEqual (df_s , expected )
1318
1318
1319
1319
def test_to_string_format_na (self ):
1320
- self .reset_display_options ()
1320
+ tm .reset_display_options ()
1321
1321
df = DataFrame ({'A' : [np .nan , - 1 , - 2.1234 , 3 , 4 ],
1322
1322
'B' : [np .nan , 'foo' , 'foooo' , 'fooooo' , 'bar' ]})
1323
1323
result = df .to_string ()
@@ -1380,15 +1380,15 @@ def test_repr_html(self):
1380
1380
fmt .set_option ('display.notebook_repr_html' , False )
1381
1381
self .frame ._repr_html_ ()
1382
1382
1383
- self .reset_display_options ()
1383
+ tm .reset_display_options ()
1384
1384
1385
1385
df = DataFrame ([[1 , 2 ], [3 , 4 ]])
1386
1386
fmt .set_option ('display.show_dimensions' , True )
1387
1387
self .assertTrue ('2 rows' in df ._repr_html_ ())
1388
1388
fmt .set_option ('display.show_dimensions' , False )
1389
1389
self .assertFalse ('2 rows' in df ._repr_html_ ())
1390
1390
1391
- self .reset_display_options ()
1391
+ tm .reset_display_options ()
1392
1392
1393
1393
def test_repr_html_wide (self ):
1394
1394
max_cols = get_option ('display.max_columns' )
@@ -1552,7 +1552,7 @@ def get_ipython():
1552
1552
repstr = self .frame ._repr_html_ ()
1553
1553
self .assertIn ('class' , repstr ) # info fallback
1554
1554
1555
- self .reset_display_options ()
1555
+ tm .reset_display_options ()
1556
1556
1557
1557
def test_pprint_pathological_object (self ):
1558
1558
"""
0 commit comments