Skip to content

Commit e56dcd8

Browse files
committed
requires Zarr v2.13+
1 parent a4703df commit e56dcd8

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

python/benchmarks/single-node-io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def run_zarr(args):
202202
dir_path = args.dir / "zarr"
203203

204204
if not hasattr(zarr.Array, "meta_array"):
205-
RuntimeError("Requires Zarr v2.13.0+ for CuPy support")
205+
raise RuntimeError("requires Zarr v2.13+")
206206

207207
a = cupy.arange(args.nbytes, dtype="uint8")
208208

python/tests/test_benchmarks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_single_node_io(run_cmd, tmp_path, api):
3030
if "zarr" in api:
3131
zarr = pytest.importorskip("zarr")
3232
if not hasattr(zarr.Array, "meta_array"):
33-
pytest.skip("Requires Zarr v2.13.0+ for CuPy support")
33+
pytest.skip("requires Zarr v2.13+")
3434

3535
retcode = run_cmd(
3636
cmd=[

python/tests/test_zarr.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
zarr = pytest.importorskip("zarr")
99
GDSStore = pytest.importorskip("kvikio.zarr").GDSStore
1010

11-
12-
cupy_support = pytest.mark.skipif(
13-
not hasattr(zarr.Array, "meta_array"),
14-
reason="Requires Zarr v2.13.0+ for CuPy support",
15-
)
11+
# To support CuPy arrays, we need the `meta_array` argument introduced
12+
# in Zarr v2.13
13+
# See <https://github.com/zarr-developers/zarr-python/pull/934>
14+
if not hasattr(zarr.Array, "meta_array"):
15+
pytest.skip("requires Zarr v2.13+", allow_module_level=True)
1616

1717

1818
@pytest.fixture
@@ -35,7 +35,6 @@ def test_direct_store_access(store, array_type):
3535
cupy.testing.assert_array_equal(a, b)
3636

3737

38-
@cupy_support
3938
def test_array(store):
4039
"""Test Zarr array"""
4140

@@ -49,7 +48,6 @@ def test_array(store):
4948
cupy.testing.assert_array_equal(a, z[:])
5049

5150

52-
@cupy_support
5351
def test_group(store):
5452
"""Test Zarr group"""
5553

0 commit comments

Comments
 (0)