(self)
| 1977 | assert actual["values"].shape == (1, 2) |
| 1978 | |
| 1979 | def test_sel_drop(self) -> None: |
| 1980 | data = Dataset({"foo": ("x", [1, 2, 3])}, {"x": [0, 1, 2]}) |
| 1981 | expected = Dataset({"foo": 1}) |
| 1982 | selected = data.sel(x=0, drop=True) |
| 1983 | assert_identical(expected, selected) |
| 1984 | |
| 1985 | expected = Dataset({"foo": 1}, {"x": 0}) |
| 1986 | selected = data.sel(x=0, drop=False) |
| 1987 | assert_identical(expected, selected) |
| 1988 | |
| 1989 | data = Dataset({"foo": ("x", [1, 2, 3])}) |
| 1990 | expected = Dataset({"foo": 1}) |
| 1991 | selected = data.sel(x=0, drop=True) |
| 1992 | assert_identical(expected, selected) |
| 1993 | |
| 1994 | def test_sel_drop_mindex(self) -> None: |
| 1995 | midx = pd.MultiIndex.from_arrays([["a", "a"], [1, 2]], names=("foo", "bar")) |
nothing calls this directly
no test coverage detected