Complete POLYCODE-WP-0002 simulator v0.1 scaffold
This commit is contained in:
parent
6499e38504
commit
a8e4f03172
9 changed files with 268 additions and 5 deletions
14
tests/test_smoke.py
Normal file
14
tests/test_smoke.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
from pathlib import Path
|
||||
|
||||
from simulator import load_params, run_simulation, write_run
|
||||
|
||||
|
||||
def test_demo_run_produces_summary(tmp_path: Path) -> None:
|
||||
params = load_params()
|
||||
params["rounds"] = 3
|
||||
summary = run_simulation(params)
|
||||
assert summary.accepted + summary.rejected == 3
|
||||
assert 0.0 <= summary.acceptance_rate <= 1.0
|
||||
out = write_run(summary, params, tmp_path)
|
||||
assert out.exists()
|
||||
assert out.stat().st_size > 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue