Skip to content

Commit b48098e

Browse files
committed
Fix dask test
1 parent d80152f commit b48098e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: tests/test_dask.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from contextlib import contextmanager
22

3-
import array_api_strict
43
import numpy as np
54
import pytest
65

@@ -171,9 +170,10 @@ def test_sort_argsort_chunk_size(xp, func, shape, chunks):
171170
@pytest.mark.parametrize("func", ["sort", "argsort"])
172171
def test_sort_argsort_meta(xp, func):
173172
"""Test meta-namespace other than numpy"""
174-
typ = type(array_api_strict.asarray(0))
173+
mxp = pytest.importorskip("array_api_strict")
174+
typ = type(mxp.asarray(0))
175175
a = da.random.random(10)
176-
b = a.map_blocks(array_api_strict.asarray)
176+
b = a.map_blocks(mxp.asarray)
177177
assert isinstance(b._meta, typ)
178178
c = getattr(xp, func)(b)
179179
assert isinstance(c._meta, typ)

0 commit comments

Comments
 (0)