File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,6 +89,21 @@ def test_resolve_outer_and_inner_chunks(
8989 assert result .inner_chunks == expected_inner
9090
9191
92+ def test_normalize_chunks_1d_errors () -> None :
93+ from zarr .core .chunk_grids import normalize_chunks_1d
94+
95+ with pytest .raises (ValueError , match = "Chunk size must be positive" ):
96+ normalize_chunks_1d (0 , 100 )
97+ with pytest .raises (ValueError , match = "Chunk size must be positive" ):
98+ normalize_chunks_1d (- 2 , 100 )
99+ with pytest .raises (ValueError , match = "must not be empty" ):
100+ normalize_chunks_1d ([], 100 )
101+ with pytest .raises (ValueError , match = "must be positive" ):
102+ normalize_chunks_1d ([10 , - 1 , 10 ], 100 )
103+ with pytest .raises (ValueError , match = "do not sum to span" ):
104+ normalize_chunks_1d ([10 , 20 ], 100 )
105+
106+
92107def test_normalize_chunks_errors () -> None :
93108 with pytest .raises (ValueError , match = "does not accept None" ):
94109 normalize_chunks_nd (None , (100 ,))
You can’t perform that action at this time.
0 commit comments