From dd4a64d46c8a9b17ea75ea7688099672f5a0fe38 Mon Sep 17 00:00:00 2001 From: "Mads R. B. Kristensen" Date: Mon, 7 Aug 2023 11:14:57 +0200 Subject: [PATCH] added tests --- zarr/tests/test_meta_array.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zarr/tests/test_meta_array.py b/zarr/tests/test_meta_array.py index 39394bd690..2545c6d624 100644 --- a/zarr/tests/test_meta_array.py +++ b/zarr/tests/test_meta_array.py @@ -9,7 +9,7 @@ import zarr.codecs from zarr.core import Array from zarr.creation import array, empty, full, ones, open_array, zeros -from zarr.hierarchy import open_group +from zarr.hierarchy import open_group, group from zarr.storage import DirectoryStore, MemoryStore, Store, ZipStore @@ -234,12 +234,13 @@ def test_full(module, compressor): assert np.all(np.isnan(z[:])) +@pytest.mark.parametrize("group_create_function", [group, open_group]) @pytest.mark.parametrize("module, compressor", param_module_and_compressor) @pytest.mark.parametrize("store_type", [None, DirectoryStore, MemoryStore, ZipStore]) -def test_group(tmp_path, module, compressor, store_type): +def test_group(tmp_path, group_create_function, module, compressor, store_type): xp = ensure_module(module) store = init_store(tmp_path, store_type) - g = open_group(store, meta_array=xp.empty(())) + g = group_create_function(store, meta_array=xp.empty(())) g.ones("data", shape=(10, 11), dtype=int, compressor=compressor) a = g["data"] assert a.shape == (10, 11)