Skip to content

Commit 152d982

Browse files
committed
Test missing subfile
1 parent 9762c9e commit 152d982

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Tests/test_file_tar.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ def test_unexpected_end(tmp_path: Path) -> None:
4040
pass
4141

4242

43+
def test_cannot_find_subfile(tmp_path: Path) -> None:
44+
with pytest.raises(OSError):
45+
with TarIO.TarIO(TEST_TAR_FILE, "test"):
46+
pass
47+
48+
4349
@pytest.mark.skipif(is_pypy(), reason="Requires CPython")
4450
def test_unclosed_file() -> None:
4551
with pytest.warns(ResourceWarning):

0 commit comments

Comments
 (0)