MCPcopy
hub / github.com/pydata/xarray / test_format_xindexes

Function test_format_xindexes

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

Source from the content-addressed store, hash-verified

1007
1008@pytest.mark.parametrize("as_dataset", (False, True))
1009def test_format_xindexes(as_dataset: bool) -> None:
1010 expected = """\
1011 Indexes:
1012 x PandasIndex"""
1013 expected = dedent(expected)
1014
1015 obj: xr.DataArray | xr.Dataset = xr.DataArray([1], coords={"x": [1]})
1016 obj = obj._to_temp_dataset() if as_dataset else obj
1017
1018 actual = repr(obj.xindexes)
1019 assert actual == expected
1020
1021
1022@requires_cftime

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…