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

Method test_name

xarray/tests/test_dataarray.py:265–277  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

263 assert_identical(actual, expected)
264
265 def test_name(self) -> None:
266 arr = self.dv
267 assert arr.name == "foo"
268
269 copied = arr.copy()
270 arr.name = "bar"
271 assert arr.name == "bar"
272 assert_equal(copied, arr)
273
274 actual = DataArray(IndexVariable("x", [3]))
275 actual.name = "y"
276 expected = DataArray([3], [("x", [3])], name="y")
277 assert_identical(actual, expected)
278
279 def test_dims(self) -> None:
280 arr = self.dv

Callers

nothing calls this directly

Calls 5

assert_equalFunction · 0.90
DataArrayClass · 0.90
IndexVariableClass · 0.90
assert_identicalFunction · 0.90
copyMethod · 0.45

Tested by

no test coverage detected