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

Method test_assign

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

Source from the content-addressed store, hash-verified

1773 assert childless.children == {}
1774
1775 def test_assign(self) -> None:
1776 dt = DataTree()
1777 expected = DataTree.from_dict({"/": xr.Dataset({"foo": 0}), "/a": None})
1778
1779 # kwargs form
1780 result = dt.assign(foo=xr.DataArray(0), a=DataTree())
1781 assert_equal(result, expected)
1782
1783 # dict form
1784 result = dt.assign({"foo": xr.DataArray(0), "a": DataTree()})
1785 assert_equal(result, expected)
1786
1787 def test_filter_like(self) -> None:
1788 flower_tree = DataTree.from_dict(

Callers

nothing calls this directly

Calls 4

assignMethod · 0.95
DataTreeClass · 0.90
assert_equalFunction · 0.90
from_dictMethod · 0.45

Tested by

no test coverage detected