aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--Lib/shutil.py2
-rw-r--r--Lib/test/test_support.py2
-rw-r--r--Lib/test/test_venv.py6
3 files changed, 7 insertions, 3 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index b37bd082eee..b903f13d8b7 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -481,7 +481,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 = []
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 902bec78451..97de81677b1 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -832,7 +832,7 @@ class TestSupport(unittest.TestCase):
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)
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py
index 0ffe3e1d0cc..890672c5d27 100644
--- a/Lib/test/test_venv.py
+++ b/Lib/test/test_venv.py
@@ -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)