Skip to content

[3.11] gh-109748: Fix again venv test_zippath_from_non_installed_posix() (GH-110149) #110153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 30, 2023
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
2 changes: 1 addition & 1 deletion Lib/shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def _copytree(entries, src, dst, symlinks, ignore, copy_function,
if ignore is not None:
ignored_names = ignore(os.fspath(src), [x.name for x in entries])
else:
ignored_names = set()
ignored_names = ()

os.makedirs(dst, exist_ok=dirs_exist_ok)
errors = []
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ def test_copy_python_src_ignore(self):
self.assertEqual(support.copy_python_src_ignore(path, os.listdir(path)),
ignored | {'build', 'venv'})

# An other directory
# Another directory
path = os.path.join(src_dir, 'Objects')
self.assertEqual(support.copy_python_src_ignore(path, os.listdir(path)),
ignored)
Expand Down
6 changes: 5 additions & 1 deletion Lib/test/test_venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,11 @@ def test_zippath_from_non_installed_posix(self):
eachpath,
os.path.join(non_installed_dir, platlibdir))
elif os.path.isfile(os.path.join(eachpath, "os.py")):
for name in os.listdir(eachpath):
names = os.listdir(eachpath)
ignored_names = copy_python_src_ignore(eachpath, names)
for name in names:
if name in ignored_names:
continue
if name == "site-packages":
continue
fn = os.path.join(eachpath, name)
Expand Down