Skip to content

Commit 580d9c5

Browse files
committed
Add decompression test
1 parent 90bb995 commit 580d9c5

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

tests/test_igzip_lib.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@
2020

2121
import itertools
2222
from typing import NamedTuple
23-
from .test_compat import DATA as RAW_DATA
24-
from isal import igzip_lib
2523

2624
import pytest
2725

26+
from isal import igzip_lib
27+
from .test_compat import DATA as RAW_DATA
28+
29+
2830
class Flag(NamedTuple):
2931
comp: int
3032
decomp: int
@@ -50,4 +52,10 @@ class Flag(NamedTuple):
5052
def test_compress_decompress(level, flag: Flag, hist_bits):
5153
comp = igzip_lib.compress(DATA, level, flag.comp, hist_bits)
5254
decomp = igzip_lib.decompress(comp, flag.decomp, hist_bits)
53-
assert decomp == DATA
55+
assert decomp == DATA
56+
57+
class TestIgzipDecompressor():
58+
compressed = igzip_lib.compress(DATA)
59+
def test_decompress(self):
60+
decomp = igzip_lib.IgzipDecompressor()
61+
assert decomp.decompress(self.compressed) == DATA

0 commit comments

Comments
 (0)