(self)
| 4434 | np.testing.assert_equal(daT.to_numpy(), v1T) |
| 4435 | |
| 4436 | def test_update(self) -> None: |
| 4437 | data = create_test_data(seed=0) |
| 4438 | expected = data.copy() |
| 4439 | var2 = Variable("dim1", np.arange(8)) |
| 4440 | actual = data |
| 4441 | actual.update({"var2": var2}) |
| 4442 | expected["var2"] = var2 |
| 4443 | assert_identical(expected, actual) |
| 4444 | |
| 4445 | actual = data.copy() |
| 4446 | actual.update(data) |
| 4447 | assert_identical(expected, actual) |
| 4448 | |
| 4449 | other = Dataset(attrs={"new": "attr"}) |
| 4450 | actual = data.copy() |
| 4451 | actual.update(other) |
| 4452 | assert_identical(expected, actual) |
| 4453 | |
| 4454 | def test_update_overwrite_coords(self) -> None: |
| 4455 | data = Dataset({"a": ("x", [1, 2])}, {"b": 3}) |
nothing calls this directly
no test coverage detected