Skip to content

Commit b692d95

Browse files
committed
Add missing break statement
1 parent 6a6ff69 commit b692d95

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/isal/igzip_threaded.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def _decompress(self):
4646
while self.running:
4747
try:
4848
block_queue.put(data, timeout=0.05)
49+
break
4950
except queue.Full:
5051
pass
5152

tests/tests_igzip_threaded.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2+
# 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
3+
# Python Software Foundation; All Rights Reserved
4+
5+
# This file is part of python-isal which is distributed under the
6+
# PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2.
7+
8+
import gzip
9+
from pathlib import Path
10+
11+
from isal import igzip_threaded
12+
13+
TEST_FILE = str((Path(__file__).parent / "data" / "test.fastq.gz"))
14+
15+
16+
def test_threaded_read():
17+
with igzip_threaded.open(TEST_FILE, "rb") as thread_f:
18+
thread_data = thread_f.read()
19+
with gzip.open(TEST_FILE, "rb") as f:
20+
data = f.read()
21+
assert thread_data == data

0 commit comments

Comments
 (0)