From 8a406dc3ba613aba372846d0cd0fd94d30466cc3 Mon Sep 17 00:00:00 2001 From: Tom White Date: Tue, 17 Sep 2024 09:41:48 +0100 Subject: [PATCH] Make test for tensorstore compression more robust (#574) --- cubed/tests/storage/test_zarr.py | 6 +++++- cubed/tests/test_core.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cubed/tests/storage/test_zarr.py b/cubed/tests/storage/test_zarr.py index 29532d7d..6e42e9fa 100644 --- a/cubed/tests/storage/test_zarr.py +++ b/cubed/tests/storage/test_zarr.py @@ -27,7 +27,11 @@ def test_lazy_zarr_array(tmp_path): ) @pytest.mark.parametrize( "compressor", - [None, {"id": "zstd"}, {"id": "blosc", "cname": "lz4", "clevel": 2, "shuffle": -1}], + [ + None, + {"id": "zstd", "level": 1}, + {"id": "blosc", "cname": "lz4", "clevel": 2, "shuffle": -1}, + ], ) def test_compression(tmp_path, compressor): zarr_path = tmp_path / "lazy.zarr" diff --git a/cubed/tests/test_core.py b/cubed/tests/test_core.py index 034d5126..1e415092 100644 --- a/cubed/tests/test_core.py +++ b/cubed/tests/test_core.py @@ -352,7 +352,11 @@ def test_default_spec_config_override(): @pytest.mark.parametrize( "compressor", - [None, {"id": "zstd"}, {"id": "blosc", "cname": "lz4", "clevel": 2, "shuffle": -1}], + [ + None, + {"id": "zstd", "level": 1}, + {"id": "blosc", "cname": "lz4", "clevel": 2, "shuffle": -1}, + ], ) def test_spec_compressor(tmp_path, compressor): spec = cubed.Spec(tmp_path, allowed_mem=100000, zarr_compressor=compressor)