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

Method test_merge_error_includes_path

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

Source from the content-addressed store, hash-verified

940 xr.merge([tree1, tree2], join="exact")
941
942 def test_merge_error_includes_path(self) -> None:
943 tree1 = xr.DataTree.from_dict({"/a/b": ("x", [0, 1])})
944 tree2 = xr.DataTree.from_dict({"/a/b": ("x", [1, 2])})
945 with pytest.raises(
946 xr.MergeError,
947 match=re.escape(
948 "Raised whilst mapping function over node(s) with path 'a'"
949 ),
950 ):
951 xr.merge([tree1, tree2], join="exact", compat="no_conflicts")
952
953 def test_fill_value_errors(self) -> None:
954 trees = [xr.DataTree(), xr.DataTree()]

Callers

nothing calls this directly

Calls 2

from_dictMethod · 0.45
mergeMethod · 0.45

Tested by

no test coverage detected