MCPcopy
hub / github.com/MinishLab/semble / test_savings_cli_dispatch

Function test_savings_cli_dispatch

tests/test_stats.py:91–98  ·  view source on GitHub ↗

Savings subcommand dispatches to format_savings_report.

(
    tmp_path: Path, monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
)

Source from the content-addressed store, hash-verified

89
90
91def test_savings_cli_dispatch(
92 tmp_path: Path, monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
93) -> None:
94 """Savings subcommand dispatches to format_savings_report."""
95 monkeypatch.setattr(sys, "argv", ["semble", "savings"])
96 monkeypatch.setattr("semble.stats._get_stats_file", lambda: tmp_path / "nonexistent.jsonl")
97 _cli_main()
98 assert "No stats yet" in capsys.readouterr().out
99
100
101def test_savings_buckets_exclude_old_records(tmp_path: Path) -> None:

Callers

nothing calls this directly

Calls 1

_cli_mainFunction · 0.90

Tested by

no test coverage detected