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

Method test_inherited

xarray/tests/test_merge.py:898–905  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

896 assert_equal(merged, expected)
897
898 def test_inherited(self) -> None:
899 tree1 = xr.DataTree.from_dict({"/a/b": ("x", [1])}, coords={"x": [0]})
900 tree2 = xr.DataTree.from_dict({"/a/c": ("x", [2])})
901 expected = xr.DataTree.from_dict(
902 {"/a/b": ("x", [1]), "a/c": ("x", [2])}, coords={"x": [0]}
903 )
904 merged = xr.merge([tree1, tree2])
905 assert_equal(merged, expected)
906
907 def test_inherited_join(self) -> None:
908 tree1 = xr.DataTree.from_dict({"/a/b": ("x", [0, 1])}, coords={"x": [0, 1]})

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
from_dictMethod · 0.45
mergeMethod · 0.45

Tested by

no test coverage detected