test_print_next_perf.py file-level

at main · View file ↗ · Intel ↗

History
1 files
1 commits
0 hotspots
0 🧊 dead
0 💥 blast risk
sha256:6 fix(ISR): default require_independent_second_reviewer to require Opera… · aaronrene · Sep 2, 2026
1 """Performance — ``ok next`` under 2.0s on kit-sized handover (§ONS.12)."""
2
3 from __future__ import annotations
4
5 import time
6 from pathlib import Path
7
8 from cli.kit_root import kit_root
9 from tests.support import FIXTURES, git_status_runner, run_cli, write_config
10
11
12 def test_ok_next_under_two_seconds(tmp_path: Path) -> None:
13 write_config(tmp_path, "config-git-only.yaml")
14 docs = tmp_path / "docs"
15 docs.mkdir(parents=True, exist_ok=True)
16 (docs / "OVERSEER-HANDOVER.md").write_text(
17 (FIXTURES / "print-next-handover.md").read_text(encoding="utf-8"),
18 encoding="utf-8",
19 )
20 (docs / "ROADMAP.md").write_text("# Roadmap\n", encoding="utf-8")
21
22 start = time.perf_counter()
23 code = run_cli(["next"], cwd=tmp_path, runner=git_status_runner(), kit=kit_root())
24 elapsed = time.perf_counter() - start
25 assert code == 0
26 assert elapsed < 2.0