aadfccf32d
Per docs/superpowers/plans/2026-06-04-experience-simulator.md Task 3. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
41 lines
1.3 KiB
Python
41 lines
1.3 KiB
Python
from hef.catalog import validate_catalog
|
|
from hef.selection import CONTENT_MODES
|
|
from simulator.fixtures import generate_fixture_catalog
|
|
|
|
|
|
def test_fixture_catalog_is_valid():
|
|
records = generate_fixture_catalog()
|
|
validate_catalog(records) # raises on any invalid record or duplicate id
|
|
|
|
|
|
def test_fixture_catalog_spans_the_coordinate_space():
|
|
records = generate_fixture_catalog()
|
|
coords = {(r.left, r.right, r.dark, r.light) for r in records}
|
|
# all 625 cells of the 5x5 brain x 5x5 mood space are present
|
|
assert len(coords) == 625
|
|
|
|
|
|
def test_fixture_catalog_has_every_content_mode():
|
|
records = generate_fixture_catalog()
|
|
present = {r.mode for r in records}
|
|
assert CONTENT_MODES <= present
|
|
|
|
|
|
def test_fixture_catalog_mixes_review_statuses():
|
|
records = generate_fixture_catalog()
|
|
statuses = {r.review_status for r in records}
|
|
assert statuses == {"proposed", "approved"}
|
|
|
|
|
|
def test_fixture_catalog_references_no_real_media():
|
|
records = generate_fixture_catalog()
|
|
assert all(r.file_path == "" for r in records)
|
|
|
|
|
|
def test_fixture_catalog_is_deterministic():
|
|
a = generate_fixture_catalog(seed=42)
|
|
b = generate_fixture_catalog(seed=42)
|
|
assert [r.id for r in a] == [r.id for r in b]
|
|
assert [r.mode for r in a] == [r.mode for r in b]
|
|
assert [r.review_status for r in a] == [r.review_status for r in b]
|