Skip to content

Commit

Permalink
Fix test with invalid compresion level
Browse files Browse the repository at this point in the history
  • Loading branch information
rhpvorderman committed Feb 3, 2023
1 parent cc75cbc commit 836b95d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_xopen.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,11 @@ def test_invalid_compression_level(tmp_path):
with pytest.raises(ValueError) as e:
with xopen(tmp_path / "out.gz", mode="w", compresslevel=17) as f:
f.write("hello") # pragma: no cover
assert "compresslevel must be" in e.value.args[0]
# The value error should warn about compresslevel or about an invalid
# initialization option.
assert (
"compresslevel must be" in e.value.args[0] or "nitialization" in e.value.args[0]
)


@pytest.mark.parametrize("ext", extensions)
Expand Down

0 comments on commit 836b95d

Please sign in to comment.