mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-28 15:45:22 -04:00
test: split embedding lane tests (#4389)
* test: split embedding lane tests * test: preserve embedding focus selector after lane split
This commit is contained in:
committed by
GitHub
parent
fc1351d0f8
commit
62a23ca4aa
+17
-1
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user