MCPcopy Index your code
hub / github.com/pydata/xarray / test_variable_repr_html

Function test_variable_repr_html

xarray/tests/test_formatting_html.py:272–281  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

270
271
272def test_variable_repr_html() -> None:
273 v = xr.Variable(["time", "x"], [[1, 2, 3], [4, 5, 6]], {"foo": "bar"})
274 assert hasattr(v, "_repr_html_")
275 with xr.set_options(display_style="html"):
276 html = v._repr_html_().strip()
277 # We don't do a complete string identity since
278 # html output is probably subject to change, is long and... reasons.
279 # Just test that something reasonable was produced.
280 assert html.startswith("<div") and html.endswith("</div>")
281 assert "xarray.Variable" in html
282
283
284def test_repr_of_nonstr_dataset(dataset: xr.Dataset) -> None:

Callers

nothing calls this directly

Calls 4

stripMethod · 0.80
startswithMethod · 0.80
endswithMethod · 0.80
_repr_html_Method · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…