summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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):