File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 38
38
_iter_shard_regions ,
39
39
_parse_chunk_encoding_v2 ,
40
40
_parse_chunk_encoding_v3 ,
41
+ _parse_codec ,
41
42
_shards_initialized ,
42
43
create_array ,
43
44
default_filters_v2 ,
@@ -1762,10 +1763,11 @@ def test_roundtrip_numcodecs() -> None:
1762
1763
with pytest .warns (ZarrUserWarning , match = warn_msg ):
1763
1764
metadata = root ["test" ].metadata .to_dict ()
1764
1765
# The names will change because numcodecs.<codec> is an alias for <codec>
1765
- expected = tuple (
1766
- {"name" : v ["name" ].removeprefix ("numcodecs." ), "configuration" : v ["configuration" ]} # type: ignore[index, attr-defined]
1767
- for v in (* filters , BYTES_CODEC , * compressors )
1768
- )
1766
+ with pytest .warns (ZarrUserWarning , match = warn_msg ):
1767
+ expected = tuple (
1768
+ _parse_codec (v , dtype = UInt8 ()).to_json (zarr_format = 3 ) # type: ignore[index, attr-defined]
1769
+ for v in (* filters , BYTES_CODEC , * compressors )
1770
+ )
1769
1771
assert metadata ["codecs" ] == expected
1770
1772
1771
1773
You can’t perform that action at this time.
0 commit comments