"""표 읽기 ②(2026-09-14 · PLAN 1장) — 「못 붙은 줄」 로 잘못 서던 자리를 **상태가 움직이는지**로 잼. 9-21 제근 고르기형 표 안내 글이 `unmatched` 에 들어가 못 붙은 줄로 섬 — 밑수는 사용자 확정 (건설품셈 1,000㎡당 빌림)이라 안내는 비고(`known_gap_note`)로 옮김(사유는 안 사라짐) 12-2 표면 마무리 원본이 12-17-1 [주] 문장을 절 제목으로 읽어 표 7장·가짜 갈래 #설치·#철거 가 붙음 """ from __future__ import annotations from B09_Estimation.B09_Estimation_KnownGaps import known_gap_note from B09_Estimation.B09_Estimation_ResourceAxis import load_work_item_master from B09_Estimation.B09_Estimation_UnitPrice import cached_build def test_제근은_못_붙은_줄이_아니고_교차참조_사유는_비고에_남음() -> None: build = cached_build() assert not build.unattached.get("FP-09-21"), build.unattached.get("FP-09-21") assert sum(1 for code in build.book.titles if code.startswith("B-FP-09-21#")) == 6 note = known_gap_note("FP-09-21") assert "교차 참조" in note and "1,000㎡당" in note def test_표면_마무리엔_미장공_표만_있고_가짜_갈래가_없음() -> None: nodes = {n["work_item_code"]: n for n in load_work_item_master()["work_items"]} assert [t["pum_table_id"] for t in nodes["FP-12-02"]["tables"]] == ["F0334"] assert "F0356" in [t["pum_table_id"] for t in nodes["FP-12-17-01"]["tables"]] build = cached_build() assert [c for c in build.book.titles if c.startswith("B-FP-12-02")] == ["B-FP-12-02"] assert not build.unattached.get("FP-12-02") def test_육상_발파암_1_3m_들어내기는_0_1m_로_읽고_고른_값_버린_값을_사유에() -> None: """③ 원문 「육상 발파암(1~2m)와 동일」(고시 5189·5201줄)은 9-13-14 자기 참조 — 같은 절 암절취· 용수 발파암이 모두 「(0~1m)와 동일」 이라 0~1m(9-13-13)로 읽음(2026-09-14 브레인 승인).""" build = cached_build() for code in ("FP-09-13-14", "FP-09-13-15"): assert code not in build.partial_ratio and code not in build.component_gaps, code # 들어내기 참조 줄은 풀림 — 남는 것은 치즐뿐(기본 조립엔 치즐 단가가 없어 종전대로) left = [label for label in build.unattached.get(code, []) if "치즐" not in label] assert not left, left source = build.factor_sources.get(code, "") assert "육상 발파암(0~1m)" in source and "자기 참조" in source, source def test_비탈면_고르기_발파암_소형브레이커는_1_0_규격으로_코드에_이어짐() -> None: """④ 9-19-3 값 「(2.45+3.05)/2/10㎡」 ← 9-19-1 표 ← [주]① 「소형브레이커는 1㎥/분」 — 값의 출처가 규격을 정함(2026-09-14 브레인 승인). 범위 별칭이 **코드로** 곧장 이음(이름만 돌려주면 규격 후보 넷이 다시 흐려짐). 「어어호스」 는 원문 오기 + 카탈로그에 호스 없음.""" from B09_Estimation.B09_Estimation_ResourceAxis import ( build_resource_axis, load_combined_catalog, ) axis = build_resource_axis(load_work_item_master(), load_combined_catalog()) rows = [ (r.resource_code, str(r.amount)) for r in axis.rows if r.work_item_code == "FP-09-19-03" ] assert ("5210-0010", "0.275") in rows, rows left = [u.cell for u in axis.unmatched if u.work_item_code == "FP-09-19-03"] assert left == ["어어호스(3/4인치)"], left def test_토사면_고르기는_두_표가_섞여_값이_불완전하다고_먼저_말함() -> None: """⑤ 사유 먼저(2026-09-14 브레인) — 원문은 절토면·성토면 두 표인데 지금은 섞여 보통인부 한 줄만 섬(조용히 틀린 값). 표 모양 본작업 전에 누가 그 값을 믿고 쓰지 않게 비고·본표에 뜸.""" from B09_Estimation.B09_Estimation_UnitPrice import detail_of note = known_gap_note("FP-09-19-01") assert "절토면" in note and "성토면" in note and "불완전" in note assert "불완전" in detail_of(cached_build(), "B-FP-09-19-01")["known_gap_note"]