@@ -130,45 +130,6 @@ def test_rectilinear_feature_flag_enabled() -> None:
130130 assert grid .ndim == 2
131131
132132
133- # ---------------------------------------------------------------------------
134- # RegularChunkGrid compatibility tests
135- # ---------------------------------------------------------------------------
136-
137-
138- def test_regular_chunk_grid_compat_construction_emits_deprecation_warning () -> None :
139- """Constructing RegularChunkGrid emits a DeprecationWarning and returns a ChunkGrid"""
140- from zarr .core .chunk_grids import RegularChunkGrid
141-
142- with pytest .warns (DeprecationWarning , match = "RegularChunkGrid is deprecated" ):
143- grid = RegularChunkGrid (chunk_shape = (10 , 20 ))
144- assert isinstance (grid , ChunkGrid )
145- assert grid .is_regular
146- assert grid .chunk_shape == (10 , 20 )
147-
148-
149- @pytest .mark .parametrize (
150- ("grid" , "expected" ),
151- [
152- (ChunkGrid .from_sizes ((100 , 200 ), (10 , 20 )), True ),
153- (ChunkGrid .from_sizes ((30 , 50 ), [[10 , 20 ], [25 , 25 ]]), False ),
154- ],
155- ids = ["regular-is-instance" , "rectilinear-is-not-instance" ],
156- )
157- def test_regular_chunk_grid_isinstance (grid : ChunkGrid , expected : bool ) -> None :
158- """isinstance check against RegularChunkGrid matches only regular grids"""
159- from zarr .core .chunk_grids import RegularChunkGrid
160-
161- assert isinstance (grid , RegularChunkGrid ) == expected
162-
163-
164- @pytest .mark .parametrize ("obj" , ["hello" , 42 ], ids = ["string" , "int" ])
165- def test_regular_chunk_grid_isinstance_false_for_unrelated_types (obj : Any ) -> None :
166- """Unrelated types are not instances of RegularChunkGrid"""
167- from zarr .core .chunk_grids import RegularChunkGrid
168-
169- assert not isinstance (obj , RegularChunkGrid )
170-
171-
172133# ---------------------------------------------------------------------------
173134# FixedDimension tests
174135# ---------------------------------------------------------------------------
0 commit comments