()
| 270 | |
| 271 | |
| 272 | def 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 | |
| 284 | def test_repr_of_nonstr_dataset(dataset: xr.Dataset) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…