feat(s36): costsim CLI + no-network + no-hardcoded-price guards
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0145ZKPLMVeqM47z2jxxokym
This commit is contained in:
parent
37625435c4
commit
76d9f793c6
3 changed files with 127 additions and 0 deletions
|
|
@ -90,3 +90,18 @@ def test_estimate_table_structure() -> None:
|
|||
assert isinstance(row["estimat_kr"], str) # edge-formatted string, never a float
|
||||
assert table["kost_mot_verdi"]["kjoring_kostet_ore"] > 0
|
||||
assert table["pricing_source"] == "unit-test prices"
|
||||
|
||||
|
||||
def test_cli_prints_estimate_table(capsys: pytest.CaptureFixture[str]) -> None:
|
||||
"""CLI smoke: ``main`` prints the estimate table + kost-mot-verdi + adoption footer, rc 0."""
|
||||
rc = costsim.main(["--projects", "4", "--profile", "local"])
|
||||
out = capsys.readouterr().out
|
||||
assert rc == 0
|
||||
assert "Kostnadsestimat" in out
|
||||
assert "kost-mot-verdi" in out
|
||||
assert "Adopsjonssti" in out
|
||||
|
||||
|
||||
def test_cli_bad_config_returns_nonzero(capsys: pytest.CaptureFixture[str]) -> None:
|
||||
rc = costsim.main(["--pricing", "/nonexistent/pricing.json"])
|
||||
assert rc == 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue