Skip to content

Commit d57fbf7

Browse files
authored
Don't compress data in hypothesis store testing (#3063)
* Don't compress data in hypothesis testing * Add comment
1 parent ee1d70f commit d57fbf7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/zarr/testing/stateful.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import zarr
1818
from zarr import Array
1919
from zarr.abc.store import Store
20+
from zarr.codecs.bytes import BytesCodec
2021
from zarr.core.buffer import Buffer, BufferPrototype, cpu, default_buffer_prototype
2122
from zarr.core.sync import SyncMixin
2223
from zarr.storage import LocalStore, MemoryStore
@@ -108,7 +109,15 @@ def add_array(
108109
assume(self.can_add(path))
109110
note(f"Adding array: path='{path}' shape={array.shape} chunks={chunks}")
110111
for store in [self.store, self.model]:
111-
zarr.array(array, chunks=chunks, path=path, store=store, fill_value=fill_value)
112+
zarr.array(
113+
array,
114+
chunks=chunks,
115+
path=path,
116+
store=store,
117+
fill_value=fill_value,
118+
# Chose bytes codec to avoid wasting time compressing the data being written
119+
codecs=[BytesCodec()],
120+
)
112121
self.all_arrays.add(path)
113122

114123
# @precondition(lambda self: bool(self.all_groups))

0 commit comments

Comments
 (0)