mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-27 23:35:01 +00:00
Pivot solar PV with a battery to its own column 🟥
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a6eaac5fe3
commit
f758216bf1
1 changed files with 23 additions and 0 deletions
|
|
@ -142,3 +142,26 @@ def test_total_retrofit_cost_sums_the_per_measure_costs() -> None:
|
|||
|
||||
# assert — the package total is the sum of the measure costs.
|
||||
assert sheet.rows[0]["total_retrofit_cost"] == 2000.0
|
||||
|
||||
|
||||
def test_solar_pv_with_a_battery_pivots_to_its_own_battery_column() -> None:
|
||||
# arrange — a solar_pv Option that includes a battery.
|
||||
prop = _property(
|
||||
measures=[
|
||||
_measure(
|
||||
measure_type="solar_pv", estimated_cost=6000.0, includes_battery=True
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
# act
|
||||
sheet = shape_scenario_sheet([prop])
|
||||
|
||||
# assert — the cost lands in the battery variant column (a stable part of the
|
||||
# contract), the plain solar_pv column stays blank, and the total still
|
||||
# counts it.
|
||||
assert "solar_pv_with_battery" in sheet.columns
|
||||
row = sheet.rows[0]
|
||||
assert row["solar_pv_with_battery"] == 6000.0
|
||||
assert row["solar_pv"] == ""
|
||||
assert row["total_retrofit_cost"] == 6000.0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue