MCPcopy
hub / github.com/pandas-dev/pandas / test_info_repr_html

Method test_info_repr_html

pandas/tests/io/formats/test_to_html.py:883–900  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

881 assert not result.error_in_exec
882
883 def test_info_repr_html(self):
884 max_rows = 60
885 max_cols = 20
886 # Long
887 h, w = max_rows + 1, max_cols - 1
888 df = DataFrame({k: np.arange(1, 1 + h) for k in np.arange(w)})
889 assert r"<class" not in df._repr_html_()
890 with option_context("display.large_repr", "info"):
891 assert r"<class" in df._repr_html_()
892
893 # Wide
894 h, w = max_rows - 1, max_cols + 1
895 df = DataFrame({k: np.arange(1, 1 + h) for k in np.arange(w)})
896 assert "<class" not in df._repr_html_()
897 with option_context(
898 "display.large_repr", "info", "display.max_columns", max_cols
899 ):
900 assert "&lt;class" in df._repr_html_()
901
902 def test_fake_qtconsole_repr_html(self, float_frame):
903 df = float_frame

Callers

nothing calls this directly

Calls 3

_repr_html_Method · 0.95
DataFrameClass · 0.90
option_contextFunction · 0.90

Tested by

no test coverage detected