Skip to content

Commit f65ca97

Browse files
committed
Add test
1 parent a4fc97e commit f65ca97

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tests/io/formats/test_format.py

+7
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ def test_repr_truncation_preserves_na(self):
129129
with option_context("display.max_rows", 2, "display.show_dimensions", False):
130130
assert repr(df) == " a\n0 <NA>\n.. ...\n9 <NA>"
131131

132+
def test_repr_truncation_dataframe_attrs(self):
133+
# 60455
134+
df = DataFrame([[0] * 10])
135+
df.attrs["b"] = DataFrame([])
136+
with option_context("display.max_columns", 2, "display.show_dimensions", False):
137+
assert repr(df) == " 0 ... 9\n0 0 ... 0"
138+
132139
def test_max_colwidth_negative_int_raises(self):
133140
# Deprecation enforced from:
134141
# https://github.com/pandas-dev/pandas/issues/31532

0 commit comments

Comments
 (0)