@@ -1392,24 +1392,26 @@ def test_repr_html_long(self):
13921392 assert u ('2 columns' ) in long_repr
13931393
13941394 def test_repr_html_float (self ):
1395- max_rows = get_option ('display.max_rows' )
1396- h = max_rows - 1
1397- df = DataFrame ({'idx' : np .linspace (- 10 , 10 , h ),
1398- 'A' : np .arange (1 , 1 + h ),
1399- 'B' : np .arange (41 , 41 + h )}).set_index ('idx' )
1400- reg_repr = df ._repr_html_ ()
1401- assert '..' not in reg_repr
1402- assert str (40 + h ) in reg_repr
1403-
1404- h = max_rows + 1
1405- df = DataFrame ({'idx' : np .linspace (- 10 , 10 , h ),
1406- 'A' : np .arange (1 , 1 + h ),
1407- 'B' : np .arange (41 , 41 + h )}).set_index ('idx' )
1408- long_repr = df ._repr_html_ ()
1409- assert '..' in long_repr
1410- assert '31' not in long_repr
1411- assert u ('%d rows ' ) % h in long_repr
1412- assert u ('2 columns' ) in long_repr
1395+ with option_context ('display.max_rows' , 60 ):
1396+
1397+ max_rows = get_option ('display.max_rows' )
1398+ h = max_rows - 1
1399+ df = DataFrame ({'idx' : np .linspace (- 10 , 10 , h ),
1400+ 'A' : np .arange (1 , 1 + h ),
1401+ 'B' : np .arange (41 , 41 + h )}).set_index ('idx' )
1402+ reg_repr = df ._repr_html_ ()
1403+ assert '..' not in reg_repr
1404+ assert str (40 + h ) in reg_repr
1405+
1406+ h = max_rows + 1
1407+ df = DataFrame ({'idx' : np .linspace (- 10 , 10 , h ),
1408+ 'A' : np .arange (1 , 1 + h ),
1409+ 'B' : np .arange (41 , 41 + h )}).set_index ('idx' )
1410+ long_repr = df ._repr_html_ ()
1411+ assert '..' in long_repr
1412+ assert '31' not in long_repr
1413+ assert u ('%d rows ' ) % h in long_repr
1414+ assert u ('2 columns' ) in long_repr
14131415
14141416 def test_repr_html_long_multiindex (self ):
14151417 max_rows = get_option ('display.max_rows' )
0 commit comments