Skip to content

Commit acd1e31

Browse files
committed
Update test for dataarray
1 parent 4f22144 commit acd1e31

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

xarray/tests/test_dataarray.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import pickle
4+
import re
45
import sys
56
import warnings
67
from collections.abc import Hashable
@@ -6952,7 +6953,12 @@ def test_drop_duplicates_1d(self, keep) -> None:
69526953
result = da.drop_duplicates("time", keep=keep)
69536954
assert_equal(expected, result)
69546955

6955-
with pytest.raises(ValueError, match="['space'] not found"):
6956+
with pytest.raises(
6957+
ValueError,
6958+
match=re.escape(
6959+
"Dimensions ('space',) not found in dataset dimensions ('time',)"
6960+
),
6961+
):
69566962
da.drop_duplicates("space", keep=keep)
69576963

69586964
def test_drop_duplicates_2d(self) -> None:

0 commit comments

Comments
 (0)