US02-01: Extract Safety and Existing Web UI Donors (#54)

This commit was merged in pull request #54.
This commit is contained in:
2026-07-15 22:37:47 +02:00
parent 19d4ce3785
commit 22558a4efa
12 changed files with 441 additions and 24 deletions

View File

@@ -1,21 +1,21 @@
"""Story-to-test traceability for Phase A (Epic E01).
"""Story-to-test traceability.
Every story US01-01..US01-07 must map to test files that exist, and every Phase A
test file must be claimed by a story — so a new test can't go unexercised and a
story can't quietly lose its coverage. Whether those tests *pass* is proven by
running the suite; this guards the mapping's completeness.
Every mapped story must map to test files that exist, every test file must be
claimed by a story (so a new test can't go unexercised), and all Phase A stories
US01-01..US01-07 must be present. Whether those tests *pass* is proven by running
the suite; this guards the mapping's completeness.
"""
import json
from pathlib import Path
REPO = Path(__file__).resolve().parents[2]
MAP = json.loads((REPO / "tests" / "phase_a_traceability.json").read_text())["stories"]
EXPECTED_STORIES = {f"US01-0{n}" for n in range(1, 8)}
MAP = json.loads((REPO / "tests" / "story_traceability.json").read_text())["stories"]
PHASE_A_STORIES = {f"US01-0{n}" for n in range(1, 8)}
def test_all_phase_a_stories_are_mapped():
assert set(MAP) == EXPECTED_STORIES
assert PHASE_A_STORIES <= set(MAP)
def test_every_mapped_test_file_exists_and_is_nonempty():