tests: add a recipe to re-record parity traces

This commit is contained in:
Dash committed 2026-10-17 15:55:43 +02:00
1 parent b69231f321
commit f03394f680
3 files changed
+21 -8

No files matched your search

+4 -8
View File
@@ -1,14 +1,10 @@
from pathlib import Path
import pytest
from game_trace import run_trace
FIXTURES = Path(__file__).parent / "fixtures"
from game_trace import FIXTURES, SEEDS, run_trace
@pytest.mark.parametrize("seed", ["alpha", "beta", "gamma"])
@pytest.mark.parametrize("seed", SEEDS)
def test_gameplay_matches_recorded_trace(seed: str) -> None:
# The fixtures were recorded before the word lists moved to data files;
# stock data must reproduce them exactly, RNG stream included.
# The fixtures pin down gameplay, RNG stream included. When a change is
# meant to alter gameplay, re-record them with `just record-traces`.
expected = (FIXTURES / f"parity_{seed}.txt").read_text().splitlines()
assert run_trace(seed) == expected