feat(b08): 사토 운반에도 「덤프 적재」 짝 줄 · 사토 줄이 갈래를 실어 보냄 — 종전 갈래 미지정으로 덤프 잎을 못 고르던 것
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BW6Jdsh18WPtYUR6THZJqn
This commit is contained in:
@@ -167,6 +167,37 @@ def test_사토도_자연상태로_선다() -> None:
|
||||
assert "자연상태" in rows[0]["spec_detail"]
|
||||
|
||||
|
||||
def test_사토에도_적재_짝_줄이_서고_단가가_선다() -> None:
|
||||
"""사토도 싣는 일이 따로(10-12 「1. 적재」) — 내역에 서는 운반 줄에만 붙고, 검산엔 안 셈."""
|
||||
from B09_Estimation.B09_Estimation_BillOfQuantities import build_bill
|
||||
from B09_Estimation.B09_Estimation_MachineProductivity_Dump import dump_haul_distances
|
||||
from B09_Estimation.B09_Estimation_UnitPrice import cached_build
|
||||
|
||||
payload = build_handoff(
|
||||
haul_table={
|
||||
"rows": [],
|
||||
"spoil": {
|
||||
"volume_m3": 100.0,
|
||||
"distance_m": 800.0,
|
||||
"by_ground_m3": {"ea_m3": 70.0},
|
||||
"ground_unknown_m3": 30.0,
|
||||
},
|
||||
}
|
||||
)
|
||||
rows = payload["work_items"]
|
||||
loads = [row for row in rows if row["name"] == "덤프 적재"]
|
||||
assert [(row["variant_value"], row["quantity"]) for row in loads] == [("토사", 70.0)]
|
||||
assert loads[0]["haul_distance_m"] is None and loads[0]["haul_equipment"] == "dump_loading"
|
||||
# 갈래 못 붙인 몫은 막힌 줄이라 짝 줄이 없음
|
||||
assert len([row for row in rows if row["name"] == "사토 운반"]) == 2
|
||||
|
||||
bill = build_bill(payload, build=cached_build(dump_haul_m=dump_haul_distances(payload)))
|
||||
got = {row.name: row for row in bill.rows if row.name in ("사토 운반", "덤프 적재")}
|
||||
assert got["사토 운반"].price_code.startswith("B-FP-10-12-01#L800")
|
||||
assert got["덤프 적재"].price_code == "B-FP-10-12-01#적재"
|
||||
assert got["사토 운반"].amount_krw > 0 and got["덤프 적재"].amount_krw > 0
|
||||
|
||||
|
||||
def test_되돌린_값이_없으면_다짐_그대로_두고_사유() -> None:
|
||||
rows = 줄들(volume_m3=61.88, distance_m=800.0, by_ground_m3={"rr_m3": 61.88})
|
||||
assert rows[0]["quantity"] == 61.88
|
||||
|
||||
Reference in New Issue
Block a user