Skip to content

Commit 19010bb

Browse files
radarherehugovk
andauthored
Use match
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent 017b16b commit 19010bb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Tests/test_file_tar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ def test_unexpected_end(tmp_path: Path) -> None:
3535
with open(tmpfile, "w"):
3636
pass
3737

38-
with pytest.raises(OSError):
38+
with pytest.raises(OSError, match="unexpected end of tar file"):
3939
with TarIO.TarIO(tmpfile, "test"):
4040
pass
4141

4242

4343
def test_cannot_find_subfile() -> None:
44-
with pytest.raises(OSError):
44+
with pytest.raises(OSError, match="cannot find subfile"):
4545
with TarIO.TarIO(TEST_TAR_FILE, "test"):
4646
pass
4747

0 commit comments

Comments
 (0)