Skip to content

Commit fc974b9

Browse files
committed
Add doctest
1 parent 4c58f60 commit fc974b9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

numcodecs/errors.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ class UnknownCodecError(Exception):
1111
----------
1212
codec_id : str
1313
Codec identifier.
14+
15+
Examples
16+
----------
17+
>>> import numcodecs
18+
>>> numcodecs.get_codec({"codec_id": "unknown"})
19+
Traceback (most recent call last):
20+
...
21+
UnknownCodecError: codec not available: 'unknown'
1422
"""
1523

1624
def __init__(self, codec_id: str):

0 commit comments

Comments
 (0)