From 8447c995e822ca63836037290d045f0fd6d53fb5 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 8 Jul 2022 12:08:25 -0400 Subject: [PATCH] test: copying __pycache__ was causing race conditions, and was unneeded anyway. --- tests/test_api.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_api.py b/tests/test_api.py index 63bb9abce..375edcec1 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -866,7 +866,11 @@ def setUp(self): # 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):