We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a367268 commit 1d424c0Copy full SHA for 1d424c0
1 file changed
tests/test_codecs/test_numcodecs.py
@@ -0,0 +1,24 @@
1
+from __future__ import annotations
2
+
3
+from numcodecs import GZip
4
5
+from zarr.codecs._numcodecs import get_numcodec
6
+from zarr.codecs._v2 import _is_numcodec, _is_numcodec_cls
7
8
9
+def test_get_numcodec() -> None:
10
+ assert get_numcodec({"id": "gzip", "level": 2}) == GZip(level=2)
11
12
13
+def test_is_numcodec() -> None:
14
+ """
15
+ Test the _is_numcodec function
16
17
+ assert _is_numcodec(GZip())
18
19
20
+def test_is_numcodec_cls() -> None:
21
22
+ Test the _is_numcodec_cls function
23
24
+ assert _is_numcodec_cls(GZip)
0 commit comments