mirror of
https://github.com/esphome/esphome.git
synced 2026-09-13 08:17:34 +00:00
Address review: marker scan covers every usage form including multiline pytestmark lists
This commit is contained in:
+3
-5
@@ -1104,11 +1104,9 @@ def get_components_per_integration_fixture() -> dict[str, set[str]]:
|
||||
|
||||
|
||||
_TEST_FUNC_RE = re.compile(r"async def (test_\w+)")
|
||||
# Decorator form plus module/class-level pytestmark assignments, which
|
||||
# get_closest_marker honors equally at runtime
|
||||
_SHARED_YAML_USE_RE = re.compile(
|
||||
r"^\s*(?:@[\w.]*|pytestmark\s*=.*?\bpytest\.)mark\.shared_yaml", re.MULTILINE
|
||||
)
|
||||
# Any usage form (decorator, pytestmark assignment or list element); only
|
||||
# test_*.py files are scanned, so the marker docs elsewhere cannot false-hit
|
||||
_SHARED_YAML_USE_RE = re.compile(r"\bmark\.shared_yaml")
|
||||
_SHARED_YAML_ARG_RE = re.compile(r"\(\s*[\"'](\w+)[\"']\s*\)")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user