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

Method test_assign

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

Source from the content-addressed store, hash-verified

165 assert not coords.identical(other_coords)
166
167 def test_assign(self) -> None:
168 coords = Coordinates(coords={"x": [0, 1, 2]})
169 expected = Coordinates(coords={"x": [0, 1, 2], "y": [3, 4]})
170
171 actual = coords.assign(y=[3, 4])
172 assert_identical(actual, expected)
173
174 actual = coords.assign({"y": [3, 4]})
175 assert_identical(actual, expected)
176
177 def test_copy(self) -> None:
178 no_index_coords = Coordinates({"foo": ("x", [1, 2, 3])})

Callers

nothing calls this directly

Calls 3

assignMethod · 0.95
CoordinatesClass · 0.90
assert_identicalFunction · 0.90

Tested by

no test coverage detected