Skip to content

Testing

The repository test runner maps working-tree paths to component-owned pytest suites and excludes measured slow tests by default.

Normal Development Loop

uv run python scripts/run_tests.py changed

changed compares tracked and untracked files with HEAD. Use --base origin/main to include committed branch changes, or repeat --changed-file PATH for an explicit selection. Arguments following -- are forwarded to pytest.

Available Suites

uv run python scripts/run_tests.py fast
uv run python scripts/run_tests.py slow
uv run python scripts/run_tests.py full

uv run python scripts/run_tests.py core
uv run python scripts/run_tests.py env
uv run python scripts/run_tests.py world_model
uv run python scripts/run_tests.py opponent_model
uv run python scripts/run_tests.py joint_graph
uv run python scripts/run_tests.py shield
uv run python scripts/run_tests.py rl
uv run python scripts/run_tests.py experiments
uv run python scripts/run_tests.py visualisation
uv run python scripts/run_tests.py tooling

Component suites omit slow nodes unless --include-slow is passed. full runs everything. CI runs fast and slow in parallel and builds the docs from the fast job.

Documentation Changes

Documentation-only changes require no pytest selection, but they do require:

uv run zensical build --strict

Running changed still helps because it confirms that no code suite was selected and prints the docs reminder.

Ownership

Every test_*.py module has one primary component in tests/suite_manifest.py; collection fails when a new module is unclassified. Cross-cutting source files deliberately select several components. Slow status is based on measured runtime, not a test’s apparent complexity.

See the maintainer runtime note for the current change-to-suite map and profiling policy.