feat(s36): estimate table (kost-mot-verdi + placeholder rows + sourced quality guidance)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0145ZKPLMVeqM47z2jxxokym
This commit is contained in:
parent
eb889a7f0e
commit
37625435c4
3 changed files with 150 additions and 0 deletions
|
|
@ -76,3 +76,17 @@ def test_unknown_effort_raises() -> None:
|
|||
pricing = costsim.PricingContract(**_VALID_PRICING)
|
||||
with pytest.raises(ValueError, match="unknown effort"):
|
||||
costsim.estimate_run_ore("m-cheap", "turbo", pricing)
|
||||
|
||||
|
||||
def test_estimate_table_structure() -> None:
|
||||
pricing = costsim.PricingContract(**_VALID_PRICING)
|
||||
mm = {"prof": {"proposer": "m-cheap", "checker": "m-dear"}}
|
||||
table = costsim.build_estimate_table(
|
||||
"prof", ["low", "high"], pricing, n_projects=2, model_map=mm
|
||||
)
|
||||
assert len(table["rows"]) == 4 # 2 roles × 2 efforts
|
||||
for row in table["rows"]:
|
||||
assert row["estimat_type"] == "øvre grense"
|
||||
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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue