gh-109748: Fix again venv test_zippath_from_non_installed_posix() (#110149)

Call also copy_python_src_ignore() on listdir() names.

shutil.copytree(): replace set() with an empty tuple. An empty tuple
becomes a constant in the compiler and checking if an item is in an
empty tuple is cheap.
This commit is contained in:
Victor Stinner 2023-09-30 20:23:26 +02:00 committed by GitHub
parent 74e425ec18
commit 0def8c712b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View file

@ -569,7 +569,11 @@ class BasicTest(BaseTest):
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)