Skip to content

Commit aacef50

Browse files
author
Russell Manser
committed
Skip numpy duck array tests when NEP18 is not active
1 parent dcffe07 commit aacef50

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

xarray/core/duck_array_ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
from .pycompat import (
1919
cupy_array_type,
2020
dask_array_type,
21-
sparse_array_type,
2221
is_duck_dask_array,
22+
sparse_array_type,
2323
)
2424
from .utils import is_duck_array
2525

xarray/tests/test_testing.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import pytest
33

44
import xarray as xr
5+
from xarray.core.npcompat import IS_NEP18_ACTIVE
56

67
from . import has_dask
78

@@ -98,7 +99,14 @@ def test_assert_duckarray_equal_failing(duckarray, obj1, obj2):
9899
@pytest.mark.parametrize(
99100
"duckarray",
100101
(
101-
pytest.param(np.array, id="numpy"),
102+
pytest.param(
103+
np.array,
104+
id="numpy",
105+
marks=pytest.mark.skipif(
106+
not IS_NEP18_ACTIVE,
107+
reason="NUMPY_EXPERIMENTAL_ARRAY_FUNCTION is not enabled",
108+
),
109+
),
102110
pytest.param(
103111
dask_from_array,
104112
id="dask",

0 commit comments

Comments
 (0)