Skip to content

Commit 9abe43e

Browse files
committed
Fix error with zlib.compress not accepting wbits values
1 parent dde6454 commit 9abe43e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_gzip_ng.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
import pytest
2424

25-
from zlib_ng import gzip_ng
25+
from zlib_ng import gzip_ng, zlib_ng
2626

2727
DATA = b'This is a simple test with gzip_ng'
2828
COMPRESSED_DATA = gzip.compress(DATA)
@@ -377,7 +377,7 @@ def test_very_long_header_in_data():
377377
# header with a very long filename.
378378
header = (b"\x1f\x8b\x08\x08\x00\x00\x00\x00\x00\xff" + 256 * 1024 * b"A" +
379379
b"\x00")
380-
compressed = header + zlib.compress(b"", 3, -15) + 8 * b"\00"
380+
compressed = header + zlib_ng.compress(b"", 3, -15) + 8 * b"\00"
381381
assert gzip_ng.decompress(compressed) == b""
382382

383383

@@ -386,7 +386,7 @@ def test_very_long_header_in_file():
386386
header = (b"\x1f\x8b\x08\x08\x00\x00\x00\x00\x00\xff" +
387387
gzip_ng.READ_BUFFER_SIZE * 2 * b"A" +
388388
b"\x00")
389-
compressed = header + zlib.compress(b"", 3, -15) + 8 * b"\00"
389+
compressed = header + zlib_ng.compress(b"", 3, -15) + 8 * b"\00"
390390
f = io.BytesIO(compressed)
391391
with gzip_ng.open(f) as gzip_file:
392392
assert gzip_file.read() == b""

0 commit comments

Comments
 (0)