Skip to content

Commit 986cf49

Browse files
committed
fix duplicate dims test
1 parent 21e639c commit 986cf49

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

xarray/tests/test_computation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -647,9 +647,9 @@ def test_unified_dim_sizes() -> None:
647647
exclude_dims={"z"},
648648
) == {"x": 1, "y": 2}
649649

650-
# duplicate dimensions
651-
with pytest.raises(ValueError):
652-
unified_dim_sizes([xr.Variable(("x", "x"), [[1]])])
650+
with pytest.raises(ValueError, match="broadcasting cannot handle"):
651+
with pytest.warns(UserWarning, match="Duplicate dimension names"):
652+
unified_dim_sizes([xr.Variable(("x", "x"), [[1]])])
653653

654654
# mismatched lengths
655655
with pytest.raises(ValueError):

0 commit comments

Comments
 (0)