diff --git a/tests/domain/modelling/test_solar_config_selection.py b/tests/domain/modelling/test_solar_config_selection.py index 6aae14dd9..01dba8533 100644 --- a/tests/domain/modelling/test_solar_config_selection.py +++ b/tests/domain/modelling/test_solar_config_selection.py @@ -348,3 +348,28 @@ def test_sub_ladder_rungs_never_take_from_north_planes() -> None: assert [c.panels_count for c in configs] == [2, 3] assert [c.yearly_energy_dc_kwh for c in configs] == [639.0, 958.5] assert all(s.azimuth_degrees == 180.0 for c in configs for s in c.segments) + + +def test_roof_capped_below_two_panels_still_yields_no_configs() -> None: + # ADR-0058 — the install floor: a roof whose cap resolves below 2 panels + # is never offered PV. Max 2 → cap 1.4 < 2; the ladder cliff is the + # correct outcome here, not a Sub-Ladder rung. + + # Arrange + potential = SolarPotential( + panel_capacity_watts=400.0, + max_array_panels_count=2, + configurations=( + SolarPanelConfiguration( + panels_count=2, + yearly_energy_dc_kwh=640.0, + segments=(_segment(2, 180.0, 640.0),), + ), + ), + ) + + # Act + configs = select_conservative_configs(potential) + + # Assert + assert configs == ()