Skip to content

Commit fb0a8e6

Browse files
author
user
committed
Format adjustment, no content changes
1 parent 399f4ea commit fb0a8e6

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

news/13550.bugfix.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
For Python versions that do not support PEP 706, pip will now raise an installation error for a
2-
source distribution when it includes a symlink that points outside the source distribution archive.
1+
For Python versions that do not support PEP 706, pip will now raise an installation error for a
2+
source distribution when it includes a symlink that points outside the source distribution archive.

tests/unit/test_utils_unpacking.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,10 @@ def test_unpack_evil_tar_link1_no_data_filter(
336336
with pytest.raises(InstallationError) as e:
337337
untar_file(tar_filepath, extract_path)
338338

339-
msg = "The tar file ({}) has a file ({}) trying to install outside target directory ({})"
339+
msg = (
340+
"The tar file ({}) has a file ({}) trying to install outside "
341+
"target directory ({})"
342+
)
340343
assert msg.format(tar_filepath, "evil_symlink", import_filepath) in str(e.value)
341344

342345
assert not os.path.exists(os.path.join(extract_path, "evil_symlink"))
@@ -370,7 +373,10 @@ def test_unpack_evil_tar_link2_no_data_filter(
370373
with pytest.raises(InstallationError) as e:
371374
untar_file(tar_filepath, extract_path)
372375

373-
msg = "The tar file ({}) has a file ({}) trying to install outside target directory ({})"
376+
msg = (
377+
"The tar file ({}) has a file ({}) trying to install outside "
378+
"target directory ({})"
379+
)
374380
assert msg.format(tar_filepath, "evil_symlink", link_path) in str(e.value)
375381

376382
assert not os.path.exists(os.path.join(extract_path, "evil_symlink"))

0 commit comments

Comments
 (0)