Files
Aislo/resources/tester/test_160_4_b08_concrete_columns.py
T
eomsangdonandClaude Opus 5.5 c6bb3cc5b6 feat(b08): 자재수량 → 총괄 · 콘크리트소요 · 채집석 공제 엑셀 흐름(160-3 · 4 · 5)
- 160-3 맞춤 없는 사본 자재 = 총괄 끝 줄(이름 · 규격 · 단위 그대로 · 알림에 이름 목록) · 맞춤 = 이름 · 규격 · 단위 · 기계 주연료 · 할증(ℓ) 뺌 · 참조 줄(승격 · 사전조합) 안 재료 셈 · 고른 품목 = MT 코드 · 파이썬 · TS 짝
- 160-4 콘크리트(기계) · 모르터 1:3 열 늘 보임(손 단위수량 → 콘크리트소요) · 엑셀 손값과 다른 배합 · 할증은 표 아래 알림 한 줄
- 160-5 채집석 공제(돌 채집 둘 · 고임돌 · 막자갈 합) = 총괄 줄 · 토공 잔토처리 = ROUND 0(잔토 − 공제) · 공제 줄 보임 · TS 짝
- 시험 test_160_3 · 4 · 5 새 · test_143_3 · 143_4 · 69 고침

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015sDZSjFvoiDjdGpgj3muc3
2026-10-09 22:53:18 +09:00

48 lines
2.3 KiB
Python

"""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}