File tree 1 file changed +13
-21
lines changed
1 file changed +13
-21
lines changed Original file line number Diff line number Diff line change @@ -282,36 +282,28 @@ def test_encode_decode_array_dtype_shape_v3(cname):
282
282
fill_value = None ,
283
283
chunk_memory_layout = "C" ,
284
284
)
285
-
286
- meta_json = (
287
- """{
285
+ meta_expected = {
288
286
"attributes" : {},
289
- "chunk_grid": {
290
- "chunk_shape": [10],
291
- "separator": "/",
292
- "type": "regular"
293
- },
287
+ "chunk_grid" : {"chunk_shape" : [10 ], "separator" : "/" , "type" : "regular" },
294
288
"chunk_memory_layout" : "C" ,
295
289
"compressor" : {
296
- """
297
- + f"""
298
- "codec": "https://purl.org/zarr/spec/codec/{ cname } /1.0",
299
- """
300
- + """
301
- "configuration": {
302
- "level": 1
303
- }
290
+ "codec" : f"https://purl.org/zarr/spec/codec/{ cname } /1.0" ,
291
+ "configuration" : {"level" : 1 },
304
292
},
305
293
"data_type" : "<f8" ,
306
294
"extensions" : [],
307
- "fill_value": null,
308
- "shape": [100, 10, 10 ]
309
- }"""
310
- )
295
+ "fill_value" : None ,
296
+ "shape" : [100 , 10 , 10 ],
297
+ }
298
+
299
+ if cname == "zstd" :
300
+ meta_expected ["compressor" ]["configuration" ]["checksum" ] = False
301
+
302
+ meta_expected_json = json .dumps (meta_expected )
311
303
312
304
# test encoding
313
305
meta_enc = Metadata3 .encode_array_metadata (meta )
314
- assert_json_equal (meta_json , meta_enc )
306
+ assert_json_equal (meta_enc , meta_expected_json )
315
307
316
308
# test decoding
317
309
meta_dec = Metadata3 .decode_array_metadata (meta_enc )
You can’t perform that action at this time.
0 commit comments