Skip to content

Commit

Permalink
Update test for dataarray
Browse files Browse the repository at this point in the history
  • Loading branch information
mgunyho committed Aug 19, 2023
1 parent 4f22144 commit acd1e31
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion xarray/tests/test_dataarray.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import pickle
import re
import sys
import warnings
from collections.abc import Hashable
Expand Down Expand Up @@ -6952,7 +6953,12 @@ def test_drop_duplicates_1d(self, keep) -> None:
result = da.drop_duplicates("time", keep=keep)
assert_equal(expected, result)

with pytest.raises(ValueError, match="['space'] not found"):
with pytest.raises(
ValueError,
match=re.escape(
"Dimensions ('space',) not found in dataset dimensions ('time',)"
),
):
da.drop_duplicates("space", keep=keep)

def test_drop_duplicates_2d(self) -> None:
Expand Down

0 comments on commit acd1e31

Please sign in to comment.