From 26b2a5016d952f54f15c17bad8a885e0af2f1a25 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Mon, 4 Apr 2022 07:32:38 -0500 Subject: [PATCH] reorder tox dependency filters to avoid skipping --- testing/downstream_testing/downstream_runner.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/testing/downstream_testing/downstream_runner.py b/testing/downstream_testing/downstream_runner.py index 8e18aab14..2d36a7a65 100644 --- a/testing/downstream_testing/downstream_runner.py +++ b/testing/downstream_testing/downstream_runner.py @@ -28,7 +28,6 @@ parser.add_argument("jobs", nargs="+", help="Job names to use.") parser.add_argument( "--matrix-exclude", nargs="*", default=[], help="Exclude these matrix names." ) - parser.add_argument( "--dry-run", action="store_true", @@ -64,11 +63,6 @@ def load_matrix_schema(repo): TOX_DEP_FILTERS = { - "pytest": { - "src": f"pytest @ file://{os.getcwd()}", - "condition": r"^pytest(?!\-)", - "has_gen": r"pytest\w*", - }, "pytest-rerunfailures": { "src": "pytest-rerunfailures @ git+https://github.com/pytest-dev/pytest-rerunfailures.git", "condition": r"^pytest-rerunfailures.*", @@ -79,6 +73,11 @@ TOX_DEP_FILTERS = { "condition": r"^pytest.*pytest-xdist", "has_gen": r"pytest\{.*\,7\d.*\}", }, + "pytest": { + "src": f"pytest @ file://{os.getcwd()}", + "condition": r"^pytest(?!\-)", + "has_gen": r"pytest\w*", + }, } @@ -96,6 +95,10 @@ class ToxDepFilter(_BaseUserDict): """Checks if `match` matches any conditions""" match_found = None for key, val in self.data.items(): + if "xdist" in match: + logging.debug( + "matches_condition: %s", re.search(val["condition"], match) + ) if re.search(val["condition"], match): match_found = key break