Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ jobs:
- "3.12"
- "3.13"
- "3.14"
- "3.15"
fail-fast: false

status:
Expand Down
3 changes: 2 additions & 1 deletion tests/utils/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,15 @@ def test_extractall_sdist_no_symlink_path_traversal_via_directory_symlink(
regular.size = len(data)
tar.addfile(regular, io.BytesIO(data))

raises = sys.version_info < (3, 15) and not WINDOWS
exception: type[Exception]
if hasattr(tarfile, "data_filter"):
exception = tarfile.OutsideDestinationError
else:
# tarfile.OutsideDestinationError does not exist
exception = ValueError

with pytest.raises(exception) if not WINDOWS else contextlib.nullcontext():
with pytest.raises(exception) if raises else contextlib.nullcontext():
extractall(source=archive, dest=dest, zip=False)

assert not (tmp_path / "traversal.txt").exists()
Expand Down
Loading