Model/tests/harness
Khalim Conn-Kowlessar 4783ff9dfd test(fixtures): build_epc() deep-copies its windows so callers can't leak state
The worksheet build_epc() fixtures wrapped a module-level SECTION_6_VERTICAL_
WINDOWS tuple in list(), so every call returned the SAME SapWindow objects. A
test that mutated a returned window (the glazing slices flip glazing_type to
single) leaked that change into every later build_epc() -- which surfaced as
double_glazing-product failures in the first-run integration tests only when
test_console ran first in the same process.

Deep-copy the windows per call in all six fixtures (000474/477/480/487/490/516)
so each EpcPropertyData owns an independent window graph, and drop the
now-redundant defensive copy at the glazing test's call site.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 09:36:56 +00:00
..
__init__.py feat(modelling): sense-check table for a Plan in the DB-less harness 2026-06-04 08:06:53 +00:00
test_cohort.py feat(modelling): turnkey offline cohort script (tables + CSV) 2026-06-04 09:30:53 +00:00
test_console.py test(fixtures): build_epc() deep-copies its windows so callers can't leak state 2026-06-05 09:36:56 +00:00
test_epc_bulk.py feat(modelling): read the gov EPC bulk export via HTTP range requests 2026-06-04 12:16:18 +00:00
test_plan_table.py feat(modelling): wire Valuation Uplift onto the Plan 2026-06-04 08:59:04 +00:00
test_report.py feat(modelling): flat per-property CSV for the inspection report 2026-06-04 11:16:52 +00:00