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 18b157f commit 58fe3fdCopy full SHA for 58fe3fd
tests/test_xopen.py
@@ -345,6 +345,20 @@ def test_bare_read_from_gz():
345
assert f.read() == "hello"
346
347
348
+@pytest.mark.parametrize("threads", [None, 0, 2])
349
+def test_concatenated_gzip(tmp_path, threads):
350
+ path = tmp_path / "hello.gz"
351
+ with gzip.open(path, mode="wt") as f:
352
+ print("Hello", file=f)
353
+ with gzip.open(path, mode="at") as f:
354
+ print("world", file=f)
355
+
356
+ with xopen(path, threads=threads) as f:
357
+ lines = list(f)
358
359
+ assert lines == ["Hello\n", "world\n"]
360
361
362
def test_read_no_threads(ext):
363
klasses = {
364
".bz2": bz2.BZ2File,
0 commit comments