File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 22
22
23
23
import pytest
24
24
25
- from zlib_ng import gzip_ng
25
+ from zlib_ng import gzip_ng , zlib_ng
26
26
27
27
DATA = b'This is a simple test with gzip_ng'
28
28
COMPRESSED_DATA = gzip .compress (DATA )
@@ -377,7 +377,7 @@ def test_very_long_header_in_data():
377
377
# header with a very long filename.
378
378
header = (b"\x1f \x8b \x08 \x08 \x00 \x00 \x00 \x00 \x00 \xff " + 256 * 1024 * b"A" +
379
379
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 "
381
381
assert gzip_ng .decompress (compressed ) == b""
382
382
383
383
@@ -386,7 +386,7 @@ def test_very_long_header_in_file():
386
386
header = (b"\x1f \x8b \x08 \x08 \x00 \x00 \x00 \x00 \x00 \xff " +
387
387
gzip_ng .READ_BUFFER_SIZE * 2 * b"A" +
388
388
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 "
390
390
f = io .BytesIO (compressed )
391
391
with gzip_ng .open (f ) as gzip_file :
392
392
assert gzip_file .read () == b""
You can’t perform that action at this time.
0 commit comments