summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2022-07-08 12:08:25 -0400
committerNed Batchelder <ned@nedbatchelder.com>2022-07-08 12:08:25 -0400
commit8447c995e822ca63836037290d045f0fd6d53fb5 (patch)
tree99e6f50f640d8bca0861247cd7eadb30ab1c93b0
parent929774317c144feaaf2123e901951124abd3e5ab (diff)
downloadpython-coveragepy-git-8447c995e822ca63836037290d045f0fd6d53fb5.tar.gz
test: copying __pycache__ was causing race conditions, and was unneeded anyway.
-rw-r--r--tests/test_api.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_api.py b/tests/test_api.py
index 63bb9abc..375edcec 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -866,7 +866,11 @@ class SourceIncludeOmitTest(IncludeOmitTestsMixin, CoverageTest):
# Since we need to import from there, we also add it to the beginning
# of sys.path.
- shutil.copytree(nice_file(TESTS_DIR, "modules"), "tests_dir_modules")
+ shutil.copytree(
+ nice_file(TESTS_DIR, "modules"),
+ "tests_dir_modules",
+ ignore=shutil.ignore_patterns("__pycache__"),
+ )
sys.path.insert(0, abs_file("tests_dir_modules"))
def coverage_usepkgs(self, **kwargs):