(self)
| 214 | assert ds.coords["x"].dims == ("x", "y") |
| 215 | |
| 216 | def test_drop_vars(self): |
| 217 | coords = Coordinates( |
| 218 | coords={ |
| 219 | "x": Variable("x", range(3)), |
| 220 | "y": Variable("y", list("ab")), |
| 221 | "a": Variable(["x", "y"], np.arange(6).reshape(3, 2)), |
| 222 | }, |
| 223 | indexes={}, |
| 224 | ) |
| 225 | |
| 226 | actual = coords.drop_vars("x") |
| 227 | assert isinstance(actual, Coordinates) |
| 228 | assert set(actual.variables) == {"a", "y"} |
| 229 | |
| 230 | actual = coords.drop_vars(["x", "y"]) |
| 231 | assert isinstance(actual, Coordinates) |
| 232 | assert set(actual.variables) == {"a"} |
| 233 | |
| 234 | def test_drop_dims(self) -> None: |
| 235 | coords = Coordinates( |
nothing calls this directly
no test coverage detected