otko/tests/unit/test_meta_gates.py
smill f361fee969 feat: named case-result load combinations with full GUI support
Snapshots the current development tree, headlined by proper load
combinations (user request): a reusable LoadCombination entity of
weighted completed static-case results (e.g. 1.2xDead + 1.6xLive).

- core: LoadCombination/LoadCombinationItem entities, Project
  integration (lookup, unique ids, reference validation)
- services: combinations.py (linear superposition + envelope),
  exported via services __init__
- commands: undoable Add/Delete/Update for combinations
- GUI: Load Combinations manager dialog, Run-dialog evaluation,
  envelope display in Results panel, Combinations tab in Table dock
- tests: unit coverage (validation, math, error paths) + integration
  superposition check vs a single factored run
2026-09-11 13:19:59 -04:00

29 lines
954 B
Python

"""Meta-gates tying the test markers to the CI commands that consume them."""
from __future__ import annotations
from pathlib import Path
try:
import tomllib
except ModuleNotFoundError: # Python < 3.11
import tomli as tomllib
ROOT = Path(__file__).resolve().parents[2]
PYPROJECT = ROOT / "pyproject.toml"
CI = ROOT / ".github" / "workflows" / "ci.yml"
HEADLESS_COMMAND = 'pytest tests/unit tests/services -m "not slow"'
def test_slow_marker_is_declared() -> None:
"""``[tool.pytest.ini_options]`` registers the ``slow`` marker."""
with PYPROJECT.open("rb") as handle:
config = tomllib.load(handle)
markers = config["tool"]["pytest"]["ini_options"]["markers"]
assert any(marker.startswith("slow:") for marker in markers), markers
def test_ci_runs_the_headless_command() -> None:
"""The headless CI command matches the marker the suite expects."""
assert HEADLESS_COMMAND in CI.read_text(encoding="utf-8")