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

Method test_update

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

Source from the content-addressed store, hash-verified

353
354class TestUpdate:
355 def test_update(self) -> None:
356 dt = DataTree()
357 dt.update({"foo": xr.DataArray(0), "a": DataTree()})
358 expected = DataTree.from_dict({"/": xr.Dataset({"foo": 0}), "a": None})
359 assert_equal(dt, expected)
360 assert dt.groups == ("/", "/a")
361
362 def test_update_new_named_dataarray(self) -> None:
363 da = xr.DataArray(name="temp", data=[0, 50])

Callers

nothing calls this directly

Calls 4

updateMethod · 0.95
DataTreeClass · 0.90
assert_equalFunction · 0.90
from_dictMethod · 0.45

Tested by

no test coverage detected