Skip to content

Commit

Permalink
Test XZ support and update LZMA for N5Store arrays
Browse files Browse the repository at this point in the history
Adds some tests for XZ support in N5 using Numcodecs' LZMA compressor
with specific options. Also tests LZMA options that are not currently
supported by N5 to ensure they still warn and are handled correctly.
  • Loading branch information
jakirkham committed Feb 24, 2019
1 parent 149f3a4 commit ba1298b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion zarr/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1602,6 +1602,10 @@ def test_compressors(self):
compressors = [
None, BZ2(), LZ4(), Zlib(), GZip()
]
if LZMA:
compressors.append(LZMA())
compressors.append(LZMA(preset=1))
compressors.append(LZMA(preset=6))
for compressor in compressors:
a1 = self.create_array(shape=1000, chunks=100, compressor=compressor)
a1[0:100] = 1
Expand All @@ -1613,7 +1617,7 @@ def test_compressors(self):
Blosc()
]
if LZMA:
compressors_warn.append(LZMA())
compressors_warn.append(LZMA(2)) # Try lzma.FORMAT_ALONE, which N5 doesn't support.
for compressor in compressors_warn:
with pytest.warns(RuntimeWarning):
a2 = self.create_array(shape=1000, chunks=100, compressor=compressor)
Expand Down

0 comments on commit ba1298b

Please sign in to comment.