MCPcopy Index your code
hub / github.com/pydata/xarray / test_update

Method test_update

xarray/tests/test_coordinates.py:142–149  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

140 del coords["nonexistent"]
141
142 def test_update(self) -> None:
143 coords = Coordinates(coords={"x": [0, 1, 2]})
144
145 coords.update({"y": ("y", [4, 5, 6])})
146 assert "y" in coords
147 assert "y" in coords.xindexes
148 expected = DataArray([4, 5, 6], coords={"y": [4, 5, 6]}, name="y")
149 assert_identical(coords["y"], expected)
150
151 def test_equals(self):
152 coords = Coordinates(coords={"x": [0, 1, 2]})

Callers

nothing calls this directly

Calls 4

updateMethod · 0.95
CoordinatesClass · 0.90
DataArrayClass · 0.90
assert_identicalFunction · 0.90

Tested by

no test coverage detected