mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-27 23:35:01 +00:00
Total each Property's retrofit cost from its measure costs 🟥
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b52b38e6f3
commit
df768d882e
1 changed files with 16 additions and 0 deletions
|
|
@ -126,3 +126,19 @@ def test_savings_and_sap_points_are_summed_across_a_propertys_measures() -> None
|
|||
assert row["co2_equivalent_savings"] == pytest.approx(1.5)
|
||||
assert row["kwh_savings"] == 3400.0
|
||||
assert row["energy_cost_savings"] == 420.0
|
||||
|
||||
|
||||
def test_total_retrofit_cost_sums_the_per_measure_costs() -> None:
|
||||
# arrange — a Property with two priced measures.
|
||||
prop = _property(
|
||||
measures=[
|
||||
_measure(measure_type="loft_insulation", estimated_cost=1200.0),
|
||||
_measure(measure_type="cavity_wall_insulation", estimated_cost=800.0),
|
||||
]
|
||||
)
|
||||
|
||||
# act
|
||||
sheet = shape_scenario_sheet([prop])
|
||||
|
||||
# assert — the package total is the sum of the measure costs.
|
||||
assert sheet.rows[0]["total_retrofit_cost"] == 2000.0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue