Skip to content

Commit fee48d3

Browse files
committed
fix doctests by making them more realistic
1 parent 9055d3b commit fee48d3

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/user-guide/arrays.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ built-in delta filter::
238238

239239
>>> import lzma
240240
>>> from numcodecs.zarr3 import LZMA
241+
>>> import warnings
242+
>>> warnings.filterwarnings("ignore", category=UserWarning)
241243
>>>
242244
>>> lzma_filters = [dict(id=lzma.FILTER_DELTA, dist=4), dict(id=lzma.FILTER_LZMA2, preset=1)]
243245
>>> compressors = LZMA(filters=lzma_filters)

docs/user-guide/consolidated_metadata.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ In Python, the consolidated metadata is available on the ``.consolidated_metadat
2727
attribute of the ``GroupMetadata`` object.
2828

2929
>>> import zarr
30+
>>> import warnings
31+
>>> warnings.filterwarnings("ignore", category=UserWarning)
3032
>>>
3133
>>> store = zarr.storage.MemoryStore()
3234
>>> group = zarr.create_group(store=store)

0 commit comments

Comments
 (0)