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

Method test_merge_attrs_drop_conflicts

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

Source from the content-addressed store, hash-verified

231 assert ds1.x == 0
232
233 def test_merge_attrs_drop_conflicts(self):
234 ds1 = xr.Dataset(attrs={"a": 0, "b": 0, "c": 0})
235 ds2 = xr.Dataset(attrs={"b": 0, "c": 1, "d": 0})
236 ds3 = xr.Dataset(attrs={"a": 0, "b": 1, "c": 0, "e": 0})
237
238 actual = xr.merge([ds1, ds2, ds3], combine_attrs="drop_conflicts")
239 expected = xr.Dataset(attrs={"a": 0, "d": 0, "e": 0})
240 assert_identical(actual, expected)
241
242 def test_merge_attrs_drop_conflicts_numpy_arrays(self):
243 """Test drop_conflicts with numpy arrays."""

Callers

nothing calls this directly

Calls 2

assert_identicalFunction · 0.90
mergeMethod · 0.45

Tested by

no test coverage detected