test: split embedding lane tests (#4389)

* test: split embedding lane tests

* test: preserve embedding focus selector after lane split
This commit is contained in:
Alexandre Teixeira
2026-06-26 17:28:40 +01:00
committed by GitHub
parent fc1351d0f8
commit 62a23ca4aa
10 changed files with 947 additions and 825 deletions
+17 -1
View File
@@ -47,6 +47,12 @@ AREAS: tuple[str, ...] = (
"uncategorized",
)
# Backward-compatible aggregate selectors for focused runs whose original
# monolithic files were split into more specific taxonomy sub-areas.
SUB_AREA_ALIASES: dict[str, tuple[str, ...]] = {
"embedding": ("embedding", "embedding_memory"),
}
def normalize_sub_area(value: str) -> str:
"""Normalize a CLI sub-area value and remove an optional ``sub_`` prefix."""
@@ -102,6 +108,13 @@ def sub_area_type(valid_sub_areas: frozenset[str]) -> Callable[[str], str]:
return validate
def _sub_area_marker_expression(sub_area: str) -> str:
"""Build the marker expression for a sub-area, including narrow aliases."""
aliases = SUB_AREA_ALIASES.get(sub_area, (sub_area,))
markers = [f"sub_{alias}" for alias in aliases]
return " or ".join(markers)
@dataclass(frozen=True)
class FocusSelection:
"""A single focused-selection request, decoupled from argparse and pytest."""
@@ -143,7 +156,10 @@ def build_marker_expression(
if area:
parts.append(f"area_{area}")
if sub_area:
parts.append(f"sub_{sub_area}")
sub_expression = _sub_area_marker_expression(sub_area)
if " or " in sub_expression:
sub_expression = f"({sub_expression})"
parts.append(sub_expression)
if fast:
parts.append("not slow")
if not parts: