(self)
| 3018 | assert_identical(expected, actual) |
| 3019 | |
| 3020 | def test_drop_multiindex_labels(self) -> None: |
| 3021 | data = create_test_multiindex() |
| 3022 | mindex = pd.MultiIndex.from_tuples( |
| 3023 | [ |
| 3024 | ("a", 2), |
| 3025 | ("b", 1), |
| 3026 | ("b", 2), |
| 3027 | ], |
| 3028 | names=("level_1", "level_2"), |
| 3029 | ) |
| 3030 | expected = Dataset({}, Coordinates.from_pandas_multiindex(mindex, "x")) |
| 3031 | |
| 3032 | actual = data.drop_sel(x=("a", 1)) |
| 3033 | assert_identical(expected, actual) |
| 3034 | |
| 3035 | def test_drop_index_labels(self) -> None: |
| 3036 | data = Dataset({"A": (["x", "y"], np.random.randn(2, 3)), "x": ["a", "b"]}) |
nothing calls this directly
no test coverage detected