Address review: shared fixtures visible to CI test selection, checkout scoped prune, cancellable build lock

This commit is contained in:
J. Nick Koston
2026-09-03 10:54:05 +02:00
parent 736218e747
commit da5f43ce41
4 changed files with 54 additions and 16 deletions
+4
View File
@@ -1104,6 +1104,7 @@ def get_components_per_integration_fixture() -> dict[str, set[str]]:
_TEST_FUNC_RE = re.compile(r"async def (test_\w+)")
_SHARED_YAML_RE = re.compile(r"@pytest\.mark\.shared_yaml\([\"'](\w+)[\"']\)")
@cache
@@ -1123,6 +1124,9 @@ def get_fixture_to_test_files() -> dict[str, frozenset[str]]:
for func in _TEST_FUNC_RE.findall(content):
base_name = func.replace("test_", "").partition("[")[0]
result.setdefault(base_name, set()).add(rel_path)
# Shared fixtures are named by marker, not by a test function
for name in _SHARED_YAML_RE.findall(content):
result.setdefault(name, set()).add(rel_path)
return {k: frozenset(v) for k, v in result.items()}