mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-23 07:10:33 +03:00
Use match
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
parent
017b16b803
commit
19010bb301
|
@ -35,13 +35,13 @@ def test_unexpected_end(tmp_path: Path) -> None:
|
||||||
with open(tmpfile, "w"):
|
with open(tmpfile, "w"):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
with pytest.raises(OSError):
|
with pytest.raises(OSError, match="unexpected end of tar file"):
|
||||||
with TarIO.TarIO(tmpfile, "test"):
|
with TarIO.TarIO(tmpfile, "test"):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def test_cannot_find_subfile() -> None:
|
def test_cannot_find_subfile() -> None:
|
||||||
with pytest.raises(OSError):
|
with pytest.raises(OSError, match="cannot find subfile"):
|
||||||
with TarIO.TarIO(TEST_TAR_FILE, "test"):
|
with TarIO.TarIO(TEST_TAR_FILE, "test"):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user