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 b692d95 commit 9487e56Copy full SHA for 9487e56
tests/tests_igzip_threaded.py renamed to tests/test_igzip_threaded.py
@@ -6,8 +6,11 @@
6
# PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2.
7
8
import gzip
9
+import io
10
from pathlib import Path
11
12
+import pytest
13
+
14
from isal import igzip_threaded
15
16
TEST_FILE = str((Path(__file__).parent / "data" / "test.fastq.gz"))
@@ -19,3 +22,12 @@ def test_threaded_read():
19
22
with gzip.open(TEST_FILE, "rb") as f:
20
23
data = f.read()
21
24
assert thread_data == data
25
26
27
+def test_threaded_error():
28
+ with open(TEST_FILE, "rb") as f:
29
+ data = f.read()
30
+ truncated_data = data[:-8]
31
+ with igzip_threaded.open(io.BytesIO(truncated_data), "rb") as tr_f:
32
+ with pytest.raises(EOFError):
33
+ tr_f.read()
0 commit comments