We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 000c141 commit e30fbc4Copy full SHA for e30fbc4
tests/test_igzip.py
@@ -62,6 +62,16 @@ def test_igzip_reader_read_zero():
62
assert test.read(0) == b""
63
64
65
+def test_igzipfile_read_truncated():
66
+ # Chop of trailer (8 bytes) and part of DEFLATE stream
67
+ data = io.BytesIO(COMPRESSED_DATA[:-10])
68
+ test = igzip.GzipFile(fileobj=data, mode="rb")
69
+ with pytest.raises(EOFError) as error:
70
+ test.read()
71
+ error.match("Compressed file ended before the end-of-stream marker was "
72
+ "reached")
73
+
74
75
@pytest.mark.parametrize("level", range(1, 10))
76
def test_decompress_stdin_stdout(capsysbinary, level):
77
"""Test if the command line can decompress data that has been compressed
0 commit comments