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

Function test_format_xindexes_none

xarray/tests/test_formatting.py:993–1005  ·  view source on GitHub ↗
(as_dataset: bool)

Source from the content-addressed store, hash-verified

991
992@pytest.mark.parametrize("as_dataset", (False, True))
993def test_format_xindexes_none(as_dataset: bool) -> None:
994 # ensure repr for empty xindexes can be displayed #8367
995
996 expected = """\
997 Indexes:
998 *empty*"""
999 expected = dedent(expected)
1000
1001 obj: xr.DataArray | xr.Dataset = xr.DataArray()
1002 obj = obj._to_temp_dataset() if as_dataset else obj
1003
1004 actual = repr(obj.xindexes)
1005 assert actual == expected
1006
1007
1008@pytest.mark.parametrize("as_dataset", (False, True))

Callers

nothing calls this directly

Calls 1

_to_temp_datasetMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…