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

Method test_constructor_no_default_index

xarray/tests/test_dataset.py:652–656  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

650 Dataset({}, {"x": mindex, "level_1": range(4)})
651
652 def test_constructor_no_default_index(self) -> None:
653 # explicitly passing a Coordinates object skips the creation of default index
654 ds = Dataset(coords=Coordinates({"x": [1, 2, 3]}, indexes={}))
655 assert "x" in ds
656 assert "x" not in ds.xindexes
657
658 def test_constructor_multiindex(self) -> None:
659 midx = pd.MultiIndex.from_product([["a", "b"], [1, 2]], names=("one", "two"))

Callers

nothing calls this directly

Calls 2

DatasetClass · 0.90
CoordinatesClass · 0.90

Tested by

no test coverage detected