"""160-4 B08 콘크리트(기계) · 모르터 1:3 열 = 사본 없어도 늘 보임 + 손 단위수량 → 콘크리트소요 (엑셀 I66 · R66 꼴 · 레미콘은 안 거침) → 총괄 시멘트 · 모래 · 자갈 — 엑셀 2공구 검산. """ from __future__ import annotations from pathlib import Path from B08_Quantity.B08_Quantity_Material_Calc import clean_overrides, compute from resources.tester.test_121_b08_material_sheets import ( EXCEL_MIX, EXCEL_PANEL, SUMMARY, UNITS, _run_ts, ) ROOT = Path(__file__).resolve().parents[2] def test_두_열은_사본_없어도_늘_보임(): bare = {"columns": SUMMARY["columns"], "total": SUMMARY["total"]} keys = [m["key"] for m in compute(bare, clean_overrides({}))["quantity"]["materials"]] assert keys == ["concrete_machine", "pipe_800", "pipe_1000", "pipe_1200", "mortar_1_3"] def test_엑셀_검산_시멘트_모래_자갈_레미콘(): """손 단위수량(엑셀 자재수량집계표) · 엑셀 배합 · 엑셀 할증 → 총괄 G18 244 · G4 16 · G5 19.""" over = clean_overrides({"units": UNITS, "mix": EXCEL_MIX}) sheets = compute(SUMMARY, over, EXCEL_PANEL) concrete = {row["key"]: row for row in sheets["concrete"]["rows"]} assert concrete["c40"]["qty"] == 27.73 and concrete["m13"]["qty"] == 1.162 # I66 · R66 assert [concrete[k]["qty"] for k in ("c25", "c40_plain", "m12")] == [None] * 3 # 두 열에서만 assert sheets["concrete"]["total"] == {"cement": 9549.41, "sand": 14.5886, "gravel": 18.0245} total = {row["key"]: row for row in sheets["material"]["rows"]} assert total["cement"]["amount"] == 244 assert total["sand"]["amount"] == 16 and total["gravel"]["amount"] == 19 assert total["remicon_25_18_80"]["amount"] == 31.62 # 레미콘 = 총괄로 곧장 assert _run_ts(SUMMARY, over) == compute(SUMMARY, over) def test_엑셀_손값과_다른_상수는_알림만(): ui = (ROOT / "B08_Quantity" / "B08_Quantity_UI_Material.ts").read_text(encoding="utf-8") assert "2공구 엑셀 수기 입력값과 다름" in ui and "b08MaterialExcel" in ui # 기본 배합은 품셈 근거 그대로(124) per = {r["key"]: r["per"] for r in compute(SUMMARY, clean_overrides({}))["concrete"]["rows"]} assert per["c40"] == {"cement": 323, "sand": 0.456, "gravel": 0.612}