From 44b39239a435f5ae77e3080b21beacf5d905e9cb Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 13 Jul 2026 15:01:27 +0000 Subject: [PATCH] =?UTF-8?q?Drop=20Calico=20placeholder=20rows=20whose=20co?= =?UTF-8?q?vering=20type=20is=20the=20"N/A"=20sentinel=20=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/condition/parsing/test_calico_parser.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/condition/parsing/test_calico_parser.py b/tests/condition/parsing/test_calico_parser.py index 563b7394e..f8ca9e557 100644 --- a/tests/condition/parsing/test_calico_parser.py +++ b/tests/condition/parsing/test_calico_parser.py @@ -40,6 +40,27 @@ def _workbook(rows: List[List[object]]) -> BytesIO: return buffer +def test_calico_parser_drops_na_sentinel_covering_rows(): + # Arrange -- Calico writes the literal string "N/A" for a placeholder row + # (no roof-covering record captured), not an empty cell. + workbook = _workbook( + [ + [443, "HOUSE", "31 Venice Avenue", "Roof Covering", "Concrete Tiles", + date(1998, 4, 1), 55, 36], + [438, "FLAT", "137 Brownhill Avenue", "Roof Covering", "N/A", + date(2000, 4, 1), 0, 973], + ] + ) + parser = CalicoParser(FakeUprnLookup({"443": 100093305101, "438": 100093388053})) + + # Act + properties = parser.parse(workbook) + + # Assert + references = [asset.asset_reference for prop in properties for asset in prop.assets] + assert references == [443] + + def test_calico_parser_drops_rows_with_no_covering_type(): # Arrange workbook = _workbook(