Files
Aislo/resources/tester/test_b08_subgrade_compaction.py
T
eomsangdonandClaude Opus 5 d6916225de feat(b08): 노체다짐 칸 — 기본 꺼짐 · 켜면 토공집계 별도 줄(수량 = 성토량)
- 산출 조건 subgrade_compaction_enabled · 기본 False(9-16-2 [주]⑤ 「대규모 성토지로서 층다짐이 필요한 경우」 조건부)
- 토공집계 「노체다짐」 줄 · 규격 진동롤러(자주식 10ton) · 매핑 FP-09-16-02 · 갈래 없음
- [주]③ 굴착기+진동롤러 조합 중 굴착기는 성토(포설) 줄이 셈 — 두 번 안 셈(#조합 철회)
- 칸 밑에 [주]⑤ 근거

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BW6Jdsh18WPtYUR6THZJqn
2026-09-14 00:27:29 +09:00

47 lines
1.8 KiB
Python

"""노체다짐 칸 — 기본 꺼짐 · 켜면 토공집계 별도 줄 · 수량 = 성토량 (2026-09-13 판정)."""
from __future__ import annotations
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
sys.path.insert(0, str(ROOT))
from B08_Quantity.B08_Quantity_Engine_EarthworkSummary import SummaryInput, build_rows # noqa: E402
TOTALS = {"fill_volume_m3": 1234.5}
def _groups(enabled: bool) -> dict:
rows = build_rows(SummaryInput(earthwork_totals=TOTALS, subgrade_compaction_enabled=enabled))
return {row.group: row for row in rows}
def test_끄면_줄_자체가_없다() -> None:
assert "노체다짐" not in _groups(False)
def test_켜면_성토량으로_선다_근거가_비고에() -> None:
row = _groups(True)["노체다짐"]
assert (row.unit, row.amount, row.in_bill) == ("㎥", 1234.5, True)
assert "[주]⑤" in row.note and "층다짐이 필요한 경우" in row.note
assert "굴착기" not in row.spec # 굴착기는 성토(포설) 줄이 셈 — 두 번 안 셈
def test_인계가_9_16_2_로_잇고_갈래를_안_싣는다() -> None:
from B08_Quantity.B08_Quantity_Engine_EarthworkSummary import build_table
from B08_Quantity.B08_Quantity_Engine_Handoff import build_handoff
table = build_table(SummaryInput(earthwork_totals=TOTALS, subgrade_compaction_enabled=True))
handed = {r["name"]: r for r in build_handoff(summary_table=table)["work_items"]}
row = handed["노체다짐"]
assert (row["work_item_code"], row["quantity"], row["in_bill"]) == ("FP-09-16-02", 1234.5, True)
assert row["variant_value"] is None and row["blocked_kind"] is None
def test_설정_기본은_꺼짐() -> None:
from common_util.common_util_project_settings import default_settings
assert default_settings()["quantity"]["subgrade_compaction_enabled"] is False