21
21
from .test_codecs import _AsyncArrayProxy , order_from_dim
22
22
23
23
24
- @pytest .mark .parametrize ("store" , ( "local" , "memory" , "zip" ) , indirect = ["store" ])
24
+ @pytest .mark .parametrize ("store" , [ "local" , "memory" , "zip" ] , indirect = ["store" ])
25
25
@pytest .mark .parametrize ("index_location" , ["start" , "end" ])
26
26
@pytest .mark .parametrize (
27
27
"array_fixture" ,
@@ -76,7 +76,7 @@ def test_sharding(
76
76
77
77
78
78
@pytest .mark .parametrize ("index_location" , ["start" , "end" ])
79
- @pytest .mark .parametrize ("store" , ( "local" , "memory" , "zip" ) , indirect = ["store" ])
79
+ @pytest .mark .parametrize ("store" , [ "local" , "memory" , "zip" ] , indirect = ["store" ])
80
80
@pytest .mark .parametrize (
81
81
"array_fixture" ,
82
82
[
@@ -126,7 +126,7 @@ def test_sharding_partial(
126
126
indirect = ["array_fixture" ],
127
127
)
128
128
@pytest .mark .parametrize ("index_location" , ["start" , "end" ])
129
- @pytest .mark .parametrize ("store" , ( "local" , "memory" , "zip" ) , indirect = ["store" ])
129
+ @pytest .mark .parametrize ("store" , [ "local" , "memory" , "zip" ] , indirect = ["store" ])
130
130
def test_sharding_partial_read (
131
131
store : Store , array_fixture : npt .NDArray [Any ], index_location : ShardingCodecIndexLocation
132
132
) -> None :
@@ -163,7 +163,7 @@ def test_sharding_partial_read(
163
163
indirect = ["array_fixture" ],
164
164
)
165
165
@pytest .mark .parametrize ("index_location" , ["start" , "end" ])
166
- @pytest .mark .parametrize ("store" , ( "local" , "memory" , "zip" ) , indirect = ["store" ])
166
+ @pytest .mark .parametrize ("store" , [ "local" , "memory" , "zip" ] , indirect = ["store" ])
167
167
def test_sharding_partial_overwrite (
168
168
store : Store , array_fixture : npt .NDArray [Any ], index_location : ShardingCodecIndexLocation
169
169
) -> None :
@@ -214,7 +214,7 @@ def test_sharding_partial_overwrite(
214
214
"inner_index_location" ,
215
215
["start" , "end" ],
216
216
)
217
- @pytest .mark .parametrize ("store" , ( "local" , "memory" , "zip" ) , indirect = ["store" ])
217
+ @pytest .mark .parametrize ("store" , [ "local" , "memory" , "zip" ] , indirect = ["store" ])
218
218
def test_nested_sharding (
219
219
store : Store ,
220
220
array_fixture : npt .NDArray [Any ],
@@ -247,7 +247,7 @@ def test_nested_sharding(
247
247
assert np .array_equal (data , read_data )
248
248
249
249
250
- @pytest .mark .parametrize ("store" , ( "local" , "memory" , "zip" ) , indirect = ["store" ])
250
+ @pytest .mark .parametrize ("store" , [ "local" , "memory" , "zip" ] , indirect = ["store" ])
251
251
def test_open_sharding (store : Store ) -> None :
252
252
path = "open_sharding"
253
253
spath = StorePath (store , path )
@@ -272,7 +272,7 @@ def test_open_sharding(store: Store) -> None:
272
272
assert a .metadata == b .metadata
273
273
274
274
275
- @pytest .mark .parametrize ("store" , ( "local" , "memory" , "zip" ) , indirect = ["store" ])
275
+ @pytest .mark .parametrize ("store" , [ "local" , "memory" , "zip" ] , indirect = ["store" ])
276
276
def test_write_partial_sharded_chunks (store : Store ) -> None :
277
277
data = np .arange (0 , 16 * 16 , dtype = "uint16" ).reshape ((16 , 16 ))
278
278
spath = StorePath (store )
@@ -296,7 +296,7 @@ def test_write_partial_sharded_chunks(store: Store) -> None:
296
296
assert np .array_equal (a [0 :16 , 0 :16 ], data )
297
297
298
298
299
- @pytest .mark .parametrize ("store" , ( "local" , "memory" , "zip" ) , indirect = ["store" ])
299
+ @pytest .mark .parametrize ("store" , [ "local" , "memory" , "zip" ] , indirect = ["store" ])
300
300
async def test_delete_empty_shards (store : Store ) -> None :
301
301
if not store .supports_deletes :
302
302
pytest .skip ("store does not support deletes" )
@@ -323,7 +323,8 @@ async def test_delete_empty_shards(store: Store) -> None:
323
323
assert np .array_equal (data , await _AsyncArrayProxy (a )[:, :].get ())
324
324
assert await store .get (f"{ path } /c/1/0" , prototype = default_buffer_prototype ()) is None
325
325
chunk_bytes = await store .get (f"{ path } /c/0/0" , prototype = default_buffer_prototype ())
326
- assert chunk_bytes is not None and len (chunk_bytes ) == 16 * 2 + 8 * 8 * 2 + 4
326
+ assert chunk_bytes is not None
327
+ assert len (chunk_bytes ) == 16 * 2 + 8 * 8 * 2 + 4
327
328
328
329
329
330
def test_pickle () -> None :
0 commit comments