Skip to content

Commit 8870475

Browse files
author
y-p
committed
TST: adjust test_repr_summary to set display.max_seq_items
1 parent bbe4306 commit 8870475

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/tests/test_index.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import pandas.core.common as com
1818

1919
import pandas.util.testing as tm
20+
import pandas.core.config as cf
2021

2122
from pandas.tseries.index import _to_m8
2223
import pandas.tseries.offsets as offsets
@@ -895,9 +896,10 @@ def test_print_unicode_columns(self):
895896
repr(df.columns) # should not raise UnicodeDecodeError
896897

897898
def test_repr_summary(self):
898-
r = repr(pd.Index(np.arange(10000)))
899-
self.assertTrue(len(r) < 100)
900-
self.assertTrue("..." in r)
899+
with cf.option_context('display.max_seq_items',10):
900+
r = repr(pd.Index(np.arange(1000)))
901+
self.assertTrue(len(r) < 100)
902+
self.assertTrue("..." in r)
901903

902904
def test_unicode_string_with_unicode(self):
903905
idx = Index(range(1000))

0 commit comments

Comments
 (0)