Skip to content

Commit d0a129a

Browse files
committed
remove parametrization over zarr_format
1 parent dfaac7e commit d0a129a

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

xarray/tests/test_backends.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
has_zarr_v3_dtypes,
8282
mock,
8383
network,
84-
parametrize_zarr_format,
8584
requires_cftime,
8685
requires_dask,
8786
requires_fsspec,
@@ -3874,8 +3873,7 @@ def test_chunk_key_encoding_v2(self) -> None:
38743873

38753874
@pytest.mark.asyncio
38763875
@requires_zarr_v3
3877-
@parametrize_zarr_format
3878-
async def test_async_load_multiple_variables(self, zarr_format) -> None:
3876+
async def test_async_load_multiple_variables(self) -> None:
38793877
target_class = zarr.AsyncArray
38803878
method_name = "getitem"
38813879
original_method = getattr(target_class, method_name)
@@ -3885,7 +3883,7 @@ async def test_async_load_multiple_variables(self, zarr_format) -> None:
38853883

38863884
original = create_test_data()
38873885
with self.create_zarr_target() as store:
3888-
original.to_zarr(store, zarr_format=zarr_format, consolidated=False)
3886+
original.to_zarr(store, zarr_format=3, consolidated=False)
38893887

38903888
with patch.object(
38913889
target_class, method_name, wraps=original_method, autospec=True
@@ -3903,11 +3901,11 @@ async def test_async_load_multiple_variables(self, zarr_format) -> None:
39033901
xrt.assert_identical(result_ds, ds.load())
39043902

39053903
@pytest.mark.asyncio
3906-
@parametrize_zarr_format
39073904
@requires_zarr_v3
39083905
@pytest.mark.parametrize("cls_name", ["Variable", "DataArray", "Dataset"])
39093906
async def test_concurrent_load_multiple_objects(
3910-
self, cls_name, zarr_format
3907+
self,
3908+
cls_name,
39113909
) -> None:
39123910
N_OBJECTS = 5
39133911

@@ -3917,7 +3915,7 @@ async def test_concurrent_load_multiple_objects(
39173915

39183916
original = create_test_data()
39193917
with self.create_zarr_target() as store:
3920-
original.to_zarr(store, consolidated=False, zarr_format=zarr_format)
3918+
original.to_zarr(store, consolidated=False, zarr_format=3)
39213919

39223920
with patch.object(
39233921
target_class, method_name, wraps=original_method, autospec=True
@@ -3983,14 +3981,12 @@ async def test_concurrent_load_multiple_objects(
39833981
"vectorized-isel",
39843982
],
39853983
)
3986-
@parametrize_zarr_format
39873984
async def test_indexing(
39883985
self,
39893986
cls_name,
39903987
method,
39913988
indexer,
39923989
target_zarr_class,
3993-
zarr_format,
39943990
) -> None:
39953991
if not has_zarr_v3_async_oindex and target_zarr_class in (
39963992
"zarr.core.indexing.AsyncOIndex",
@@ -4017,7 +4013,7 @@ def _resolve_class_from_string(class_path: str) -> type[Any]:
40174013

40184014
original = create_test_data()
40194015
with self.create_zarr_target() as store:
4020-
original.to_zarr(store, consolidated=False, zarr_format=zarr_format)
4016+
original.to_zarr(store, consolidated=False, zarr_format=3)
40214017

40224018
with patch.object(
40234019
target_class, method_name, wraps=original_method, autospec=True
@@ -4067,15 +4063,16 @@ def _resolve_class_from_string(class_path: str) -> type[Any]:
40674063
), # tests vindexing
40684064
],
40694065
)
4070-
@parametrize_zarr_format
40714066
async def test_raise_on_older_zarr_version(
4072-
self, indexer, expected_err_msg, zarr_format
4067+
self,
4068+
indexer,
4069+
expected_err_msg,
40734070
):
40744071
"""Test that trying to use async load with insufficiently new version of zarr raises a clear error"""
40754072

40764073
original = create_test_data()
40774074
with self.create_zarr_target() as store:
4078-
original.to_zarr(store, consolidated=False, zarr_format=zarr_format)
4075+
original.to_zarr(store, consolidated=False, zarr_format=3)
40794076

40804077
ds = xr.open_zarr(store, consolidated=False, chunks=None)
40814078
var = ds["var1"].variable

0 commit comments

Comments
 (0)