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

Method test_align_non_unique

xarray/tests/test_dataset.py:2727–2735  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2725 align(a, b)
2726
2727 def test_align_non_unique(self) -> None:
2728 x = Dataset({"foo": ("x", [3, 4, 5]), "x": [0, 0, 1]})
2729 x1, x2 = align(x, x)
2730 assert_identical(x1, x)
2731 assert_identical(x2, x)
2732
2733 y = Dataset({"bar": ("x", [6, 7]), "x": [0, 1]})
2734 with pytest.raises(ValueError, match=r"cannot reindex or align"):
2735 align(x, y)
2736
2737 def test_align_str_dtype(self) -> None:
2738 a = Dataset({"foo": ("x", [0, 1])}, coords={"x": ["a", "b"]})

Callers

nothing calls this directly

Calls 3

DatasetClass · 0.90
alignFunction · 0.90
assert_identicalFunction · 0.90

Tested by

no test coverage detected