reorder tox dependency filters to avoid skipping
This commit is contained in:
parent
5197801025
commit
26b2a5016d
|
@ -28,7 +28,6 @@ parser.add_argument("jobs", nargs="+", help="Job names to use.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--matrix-exclude", nargs="*", default=[], help="Exclude these matrix names."
|
"--matrix-exclude", nargs="*", default=[], help="Exclude these matrix names."
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--dry-run",
|
"--dry-run",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
|
@ -64,11 +63,6 @@ def load_matrix_schema(repo):
|
||||||
|
|
||||||
|
|
||||||
TOX_DEP_FILTERS = {
|
TOX_DEP_FILTERS = {
|
||||||
"pytest": {
|
|
||||||
"src": f"pytest @ file://{os.getcwd()}",
|
|
||||||
"condition": r"^pytest(?!\-)",
|
|
||||||
"has_gen": r"pytest\w*",
|
|
||||||
},
|
|
||||||
"pytest-rerunfailures": {
|
"pytest-rerunfailures": {
|
||||||
"src": "pytest-rerunfailures @ git+https://github.com/pytest-dev/pytest-rerunfailures.git",
|
"src": "pytest-rerunfailures @ git+https://github.com/pytest-dev/pytest-rerunfailures.git",
|
||||||
"condition": r"^pytest-rerunfailures.*",
|
"condition": r"^pytest-rerunfailures.*",
|
||||||
|
@ -79,6 +73,11 @@ TOX_DEP_FILTERS = {
|
||||||
"condition": r"^pytest.*pytest-xdist",
|
"condition": r"^pytest.*pytest-xdist",
|
||||||
"has_gen": r"pytest\{.*\,7\d.*\}",
|
"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"""
|
"""Checks if `match` matches any conditions"""
|
||||||
match_found = None
|
match_found = None
|
||||||
for key, val in self.data.items():
|
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):
|
if re.search(val["condition"], match):
|
||||||
match_found = key
|
match_found = key
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue