MCPcopy
hub / github.com/pydata/xarray / test_update_doesnt_alter_child_name

Method test_update_doesnt_alter_child_name

xarray/tests/test_datatree.py:369–374  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

367 assert_equal(folder1["results"], expected)
368
369 def test_update_doesnt_alter_child_name(self) -> None:
370 dt = DataTree()
371 dt.update({"foo": xr.DataArray(0), "a": DataTree(name="b")})
372 assert "a" in dt.children
373 child = dt["a"]
374 assert child.name == "a"
375
376 def test_update_overwrite(self) -> None:
377 actual = DataTree.from_dict({"a": DataTree(xr.Dataset({"x": 1}))})

Callers

nothing calls this directly

Calls 2

updateMethod · 0.95
DataTreeClass · 0.90

Tested by

no test coverage detected