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

Method test_init_default_index

xarray/tests/test_coordinates.py:24–28  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

22 assert_identical(coords.to_dataset(), expected)
23
24 def test_init_default_index(self) -> None:
25 coords = Coordinates(coords={"x": [1, 2]})
26 expected = Dataset(coords={"x": [1, 2]})
27 assert_identical(coords.to_dataset(), expected)
28 assert "x" in coords.xindexes
29
30 @pytest.mark.filterwarnings("error:IndexVariable")
31 def test_init_no_default_index(self) -> None:

Callers

nothing calls this directly

Calls 4

to_datasetMethod · 0.95
CoordinatesClass · 0.90
DatasetClass · 0.90
assert_identicalFunction · 0.90

Tested by

no test coverage detected