(self)
| 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")) |
| 660 | coords = Coordinates.from_pandas_multiindex(midx, "x") |
| 661 | |
| 662 | ds = Dataset(coords=coords) |
| 663 | assert_identical(ds, coords.to_dataset()) |
| 664 | |
| 665 | with pytest.warns( |
| 666 | FutureWarning, |
| 667 | match=r".*`pandas.MultiIndex`.*no longer be implicitly promoted.*", |
| 668 | ): |
| 669 | Dataset(data_vars={"x": midx}) |
| 670 | |
| 671 | with pytest.warns( |
| 672 | FutureWarning, |
| 673 | match=r".*`pandas.MultiIndex`.*no longer be implicitly promoted.*", |
| 674 | ): |
| 675 | Dataset(coords={"x": midx}) |
| 676 | |
| 677 | def test_constructor_custom_index(self) -> None: |
| 678 | class CustomIndex(Index): ... |
nothing calls this directly
no test coverage detected