14 lines
443 B
Python
14 lines
443 B
Python
|
|
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
|