Skip to content

Commit ccd266e

Browse files
committed
Making GpuMemoryStore tests conditional on cupy being available
1 parent fe8591a commit ccd266e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/v3/test_store/test_memory.py

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
from zarr.store.memory import GpuMemoryStore, MemoryStore
77
from zarr.testing.store import StoreTests
88

9+
try:
10+
import cupy as cp
11+
except ImportError:
12+
cp = None
13+
914

1015
class TestMemoryStore(StoreTests[MemoryStore]):
1116
store_cls = MemoryStore
@@ -40,6 +45,7 @@ def test_list_prefix(self, store: MemoryStore) -> None:
4045
assert True
4146

4247

48+
@pytest.mark.skipif(cp is None, reason="requires cupy")
4349
class TestGpuMemoryStore(StoreTests[GpuMemoryStore]):
4450
store_cls = GpuMemoryStore
4551

0 commit comments

Comments
 (0)