File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed
Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change 55import pickle
66import re
77import sys
8+ from contextlib import nullcontext
89from itertools import accumulate
910from typing import TYPE_CHECKING , Any , Literal
1011from unittest import mock
@@ -1419,14 +1420,23 @@ def test_order(
14191420 # Test without passing config parameter
14201421 config = None
14211422
1422- arr = zarr .create_array (
1423- store = store ,
1424- shape = (2 , 2 ),
1425- zarr_format = zarr_format ,
1426- dtype = "i4" ,
1427- order = order ,
1428- config = config ,
1429- )
1423+ if zarr_format == 3 and order is not None :
1424+ ctx = pytest .warns (
1425+ RuntimeWarning ,
1426+ match = "The `order` keyword argument has no effect for Zarr format 3 arrays" ,
1427+ )
1428+ else :
1429+ ctx = nullcontext ()
1430+
1431+ with ctx :
1432+ arr = zarr .create_array (
1433+ store = store ,
1434+ shape = (2 , 2 ),
1435+ zarr_format = zarr_format ,
1436+ dtype = "i4" ,
1437+ order = order ,
1438+ config = config ,
1439+ )
14301440 assert arr .order == expected
14311441 if zarr_format == 2 :
14321442 assert arr .metadata .zarr_format == 2
You can’t perform that action at this time.
0 commit comments