"""Tests for the council config: budget and routing integrity. No GPU. Run: python -m pytest tests/ -q """ import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parents[1])) from ttw.council import CREATURE_ENGINE, ENGINES, assert_param_budget from ttw.normalize import NORMALIZERS from ttw.world import seed_world def test_param_budget_within_cap(): assert assert_param_budget() <= 32 def test_every_creature_has_an_engine(): world = seed_world() for name in world.creatures: assert name in CREATURE_ENGINE, f"{name} has no council engine" def test_every_routed_engine_exists(): for eid in CREATURE_ENGINE.values(): assert eid in ENGINES, f"creature routed to unknown engine {eid!r}" def test_every_engine_normalizer_is_registered(): for spec in ENGINES.values(): assert spec.normalizer in NORMALIZERS