We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e2bda23 commit 33beed8Copy full SHA for 33beed8
pandas/tests/io/formats/test_format.py
@@ -1586,8 +1586,12 @@ def test_repr_html_long_and_wide(self):
1586
assert '...' in df._repr_html_()
1587
1588
def test_info_repr(self):
1589
+ # GH#21746 For tests inside a terminal (i.e. not CI) we need to detect
1590
+ # the terminal size to ensure that we try to print something "too big"
1591
+ term_width, term_height = get_terminal_size()
1592
+
1593
max_rows = 60
- max_cols = 20
1594
+ max_cols = 20 + (max(term_width, 80) - 80) // 4
1595
# Long
1596
h, w = max_rows + 1, max_cols - 1
1597
df = DataFrame({k: np.arange(1, 1 + h) for k in np.arange(w)})
0 commit comments