(self)
| 232 | assert set(actual.variables) == {"a"} |
| 233 | |
| 234 | def test_drop_dims(self) -> None: |
| 235 | coords = Coordinates( |
| 236 | coords={ |
| 237 | "x": Variable("x", range(3)), |
| 238 | "y": Variable("y", list("ab")), |
| 239 | "a": Variable(["x", "y"], np.arange(6).reshape(3, 2)), |
| 240 | }, |
| 241 | indexes={}, |
| 242 | ) |
| 243 | |
| 244 | actual = coords.drop_dims("x") |
| 245 | assert isinstance(actual, Coordinates) |
| 246 | assert set(actual.variables) == {"y"} |
| 247 | |
| 248 | actual = coords.drop_dims(["x", "y"]) |
| 249 | assert isinstance(actual, Coordinates) |
| 250 | assert set(actual.variables) == set() |
| 251 | |
| 252 | def test_rename_dims(self) -> None: |
| 253 | coords = Coordinates( |
nothing calls this directly
no test coverage detected