From de887b0dd1daf38cbf04838040c37cc32f87b872 Mon Sep 17 00:00:00 2001 From: John Eskew Date: Fri, 29 Sep 2017 14:36:58 -0400 Subject: [PATCH] fixup! Remove cache dirs from commonlib testing. --- pavelib/utils/envs.py | 5 +++-- pavelib/utils/test/suites/pytest_suite.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pavelib/utils/envs.py b/pavelib/utils/envs.py index 739f846a9c..f08e40f29f 100644 --- a/pavelib/utils/envs.py +++ b/pavelib/utils/envs.py @@ -200,11 +200,12 @@ class Env(object): JS_REPORT_DIR = REPORT_DIR / 'javascript' - # Directories used for common/lib/ tests + # Directories used for common/lib/tests + IGNORED_TEST_DIRS = ('__pycache__', '.cache') LIB_TEST_DIRS = [] for item in (REPO_ROOT / "common/lib").listdir(): dir_name = (REPO_ROOT / 'common/lib' / item) - if dir_name.isdir() and not dir_name.endswith(('__pycache__', '.cache')): + if dir_name.isdir() and not dir_name.endswith(IGNORED_TEST_DIRS): LIB_TEST_DIRS.append(path("common/lib") / item.basename()) LIB_TEST_DIRS.append(path("pavelib/paver_tests")) diff --git a/pavelib/utils/test/suites/pytest_suite.py b/pavelib/utils/test/suites/pytest_suite.py index bc8b1c12f4..0f8d7d235c 100644 --- a/pavelib/utils/test/suites/pytest_suite.py +++ b/pavelib/utils/test/suites/pytest_suite.py @@ -191,7 +191,7 @@ class SystemTestSuite(PytestSuite): """ Should this path be included in the pytest arguments? """ - if path.endswith('__pycache__'): + if path.endswith(Env.IGNORED_TEST_DIRS): return False return path.endswith('.py') or os.path.isdir(path)