"""발파 화약류(9-5-1) — 2026-09-14 브레인 300: 규격 미정은 설계자 선택 + 사유 · 값은 수동 단가.""" from __future__ import annotations from B09_Estimation.B09_Estimation_UnitPrice import cached_build, detail_of def test_단가가_없으면_규격_미정_사유와_자재_단가_칸() -> None: build = cached_build() labels = build.unattached.get("FP-09-05-01") or [] assert any("뇌관 — 규격 미정" in label for label in labels), labels assert not any(label.replace(" ", "") == "뇌관" for label in labels), labels assert "FP-09-05-01" in build.material_uses.get("AR-M-0965627d", []) def test_설계자_단가가_들면_표_수량으로_붙음() -> None: build = cached_build(material_prices=(("AR-M-0965627d", "500", "견적"),)) rows = {r["ref_code"]: float(r["quantity"]) for r in detail_of(build, "B-FP-09-05-01")["rows"]} assert rows.get("AR-M-0965627d") == 1.0, rows labels = build.unattached.get("FP-09-05-01") or [] assert not any("뇌관" in label for label in labels), labels def test_착암기는_압축기_부수물이라_손료_고시_없음_사유() -> None: """건설품셈 8-3-6 (5205) [주]① 「부수물은 별도 계상」 — 압축기 손료에 든다고 안 정함.""" labels = cached_build().unattached.get("FP-09-05-01") or [] note = next((label for label in labels if label.startswith("착암기")), "") assert "부수물" in note and "고시 없음" in note, labels