diff --git a/icechunk-python/tests/conftest.py b/icechunk-python/tests/conftest.py index 848c7b609..5b760942b 100644 --- a/icechunk-python/tests/conftest.py +++ b/icechunk-python/tests/conftest.py @@ -6,8 +6,15 @@ from hypothesis import HealthCheck, settings from mypy_boto3_s3.client import S3Client +import zarr from icechunk import Repository, SpecVersion, in_memory_storage, local_filesystem_storage +# Zarr may gate rectilinear chunk grids behind a config flag. +# Icechunk supports them, so enable unconditionally for tests. +zarr_has_rectilinear_chunks = "array.rectilinear_chunks" in zarr.config +if zarr_has_rectilinear_chunks: + zarr.config.set({"array.rectilinear_chunks": True}) + # --------------------------------------------------------------------------- # Hypothesis profiles # diff --git a/icechunk-python/tests/test_zarr/test_stateful.py b/icechunk-python/tests/test_zarr/test_stateful.py index c6fa98867..ca8ed79d5 100644 --- a/icechunk-python/tests/test_zarr/test_stateful.py +++ b/icechunk-python/tests/test_zarr/test_stateful.py @@ -4,9 +4,8 @@ from typing import Any, TypeVar import hypothesis.strategies as st -import numpy as np import pytest -from hypothesis import assume, note +from hypothesis import note from hypothesis.stateful import ( initialize, invariant, @@ -32,10 +31,6 @@ from zarr.testing.stateful import ZarrHierarchyStateMachine, split_prefix_name PROTOTYPE = default_buffer_prototype() -from zarr.testing.strategies import ( - node_names, - np_array_and_chunks, -) Frequency = TypeVar("Frequency", bound=Callable[..., Any]) @@ -286,22 +281,6 @@ def shift_array(self, data: st.DataObject) -> None: self.store.session.shift_array(f"/{array_path}", offset) self._sync(self.model.shift_array(array_path, offset, num_chunks)) - @rule( - data=st.data(), - name=node_names, - array_and_chunks=np_array_and_chunks(), - ) - def add_array( - self, - data: st.DataObject, - name: str, - array_and_chunks: tuple[np.ndarray[Any, Any], tuple[int, ...]], - ) -> None: - array, _ = array_and_chunks - # TODO: support size-0 arrays GH392 - assume(array.size > 0) - super().add_array(data, name, array_and_chunks) - def _compare_list_dir( self, model: ModelStore, store: ic.IcechunkStore, paths: set[str] ) -> None: