(self)
| 966 | assert "..." in df._repr_html_() |
| 967 | |
| 968 | def test_repr_html_long(self): |
| 969 | with option_context("display.max_rows", 60): |
| 970 | max_rows = get_option("display.max_rows") |
| 971 | h = max_rows - 1 |
| 972 | df = DataFrame({"A": np.arange(1, 1 + h), "B": np.arange(41, 41 + h)}) |
| 973 | reg_repr = df._repr_html_() |
| 974 | assert ".." not in reg_repr |
| 975 | assert str(41 + max_rows // 2) in reg_repr |
| 976 | |
| 977 | h = max_rows + 1 |
| 978 | df = DataFrame({"A": np.arange(1, 1 + h), "B": np.arange(41, 41 + h)}) |
| 979 | long_repr = df._repr_html_() |
| 980 | assert ".." in long_repr |
| 981 | assert str(41 + max_rows // 2) not in long_repr |
| 982 | assert f"{h} rows " in long_repr |
| 983 | assert "2 columns" in long_repr |
| 984 | |
| 985 | def test_repr_html_float(self): |
| 986 | with option_context("display.max_rows", 60): |
nothing calls this directly
no test coverage detected