Skip to content

Commit f59fa84

Browse files
committed
check if lz4 is present in the system. avoid errors on windows
1 parent e5194f4 commit f59fa84

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_xopen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ def test_binary(fname):
113113
def test_roundtrip(ext, tmp_path, threads, mode):
114114
if ext == ".zst" and threads == 0 and zstandard is None:
115115
return
116+
if ext == ".lz4" and shutil.which("lz4") is None:
117+
return
116118
path = tmp_path / f"file{ext}"
117-
if not path.parent.exists():
118-
path.mkdir()
119119
data = b"Hello" if mode == "b" else "Hello"
120120
with xopen(path, "w" + mode, threads=threads) as f:
121121
f.write(data)

0 commit comments

Comments
 (0)