(self)
| 175 | assert_identical(actual, expected) |
| 176 | |
| 177 | def test_copy(self) -> None: |
| 178 | no_index_coords = Coordinates({"foo": ("x", [1, 2, 3])}) |
| 179 | copied = no_index_coords.copy() |
| 180 | assert_identical(no_index_coords, copied) |
| 181 | v0 = no_index_coords.variables["foo"] |
| 182 | v1 = copied.variables["foo"] |
| 183 | assert v0 is not v1 |
| 184 | assert source_ndarray(v0.data) is source_ndarray(v1.data) |
| 185 | |
| 186 | deep_copied = no_index_coords.copy(deep=True) |
| 187 | assert_identical(no_index_coords.to_dataset(), deep_copied.to_dataset()) |
| 188 | v0 = no_index_coords.variables["foo"] |
| 189 | v1 = deep_copied.variables["foo"] |
| 190 | assert v0 is not v1 |
| 191 | assert source_ndarray(v0.data) is not source_ndarray(v1.data) |
| 192 | |
| 193 | def test_align(self) -> None: |
| 194 | coords = Coordinates(coords={"x": [0, 1, 2]}) |
nothing calls this directly
no test coverage detected