Address review: prefs helper requires the redirect, visible stamp rejection, lock aware age re-probe, wider marker regexes

This commit is contained in:
J. Nick Koston
2026-09-03 21:01:49 +02:00
parent 19f5641706
commit 36468022ea
3 changed files with 25 additions and 11 deletions
+3 -3
View File
@@ -1104,8 +1104,8 @@ 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+)[\"']\)")
_SHARED_YAML_DECORATOR_RE = re.compile(r"@pytest\.mark\.shared_yaml\(")
_SHARED_YAML_RE = re.compile(r"pytest\.mark\.shared_yaml\([\"'](\w+)[\"']\)")
_SHARED_YAML_USE_RE = re.compile(r"pytest\.mark\.shared_yaml\(")
@cache
@@ -1127,7 +1127,7 @@ def get_fixture_to_test_files() -> dict[str, frozenset[str]]:
result.setdefault(base_name, set()).add(rel_path)
# Shared fixtures are named by marker, not by a test function
names = _SHARED_YAML_RE.findall(content)
if len(names) != len(_SHARED_YAML_DECORATOR_RE.findall(content)):
if len(names) != len(_SHARED_YAML_USE_RE.findall(content)):
# A wrapped or non-literal marker would silently drop the mapping
# and CI would select no tests for that fixture
raise ValueError(