test_print_next_perf.py
python
sha256:a78e7e5a8740e03315f325d19edeb3aa1b306b3337d04abbaa9a9e0f3bbeb7a1
docs: MuseHub-first before ISR #74 — staging solidify NEXT
Human
5 days ago
| 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 |
File History
1 commit
sha256:a78e7e5a8740e03315f325d19edeb3aa1b306b3337d04abbaa9a9e0f3bbeb7a1
docs: MuseHub-first before ISR #74 — staging solidify NEXT
Human
5 days ago