Merge remote-tracking branch 'origin/sub_laptop_1' into main_laptop_1

This commit is contained in:
2026-09-15 01:10:13 +09:00
5 changed files with 75 additions and 13 deletions
+33 -3
View File
@@ -87,14 +87,44 @@ def test_인계_막힘_갈래가_상태를_따른다() -> None:
assert handed["골막이"]["blocked_kind"] == "unit_data_missing"
# 해당 없음은 막힘이 아니다.
assert handed["비탈 규준틀"]["blocked_kind"] is None
# 공종이 품셈에 없는 부대시설은 개소를 넣어도 종전대로 「입력」(별도 단가) 갈래.
entered = _table(ancillary_counts={"national_point_sign": 3})
# 개소를 안 넣은 부대시설은 입력 갈래(개소를 넣으면 수량이 섬).
assert handed["국가지점번호판"]["blocked_kind"] == "input_missing"
def test_품셈_공종이_없는_부대시설은_셋째_상태로_자재_단가에_잇는다() -> None:
"""개소를 넣어도 공종이 없어 단가가 영영 안 선다 — 「입력이 필요함」으로 두면 사용자가 기다린다.
브레인 판정(2026-09-14): 「품셈 공종 없음 — 단가를 직접 넣어야 함」 · 「자재 단가」 탭 통로
(화약류·치즐과 같은 자리) — 수량은 자재총괄(사급) 줄로 가고 단가를 넣으면 금액이 선다.
"""
from B08_Quantity.B08_Quantity_Engine_Preparation_Status import STATUS_NO_WORK_ITEM
from B08_Quantity.B08_Quantity_Router_Material import material_table_for
entered = _table(ancillary_counts={"national_point_sign": 3, "site_container": 1})
rows = _by_item(entered)
assert rows["국가지점번호판"]["status"] == STATUS_NO_WORK_ITEM
assert STATUS_NO_WORK_ITEM == "품셈 공종 없음 — 단가를 직접 넣어야 함"
assert "자재 단가" in rows["국가지점번호판"]["reason"]
# 공종이 있는 가설창고는 그대로 값 있음.
assert rows["가설창고(컨테이너)"]["status"] == "값 있음"
# 인계 — 막힘이 아니라 자재 줄로 가는 줄(두 번 세지 않음).
sign = next(
row
for row in build_handoff(preparation_table=entered)["work_items"]
if row["name"] == "국가지점번호판"
)
assert sign["blocked_kind"] == "input_missing"
assert sign["blocked_kind"] is None and sign["in_bill"] is False
# 자재총괄 사급 줄 — 「자재 단가」 탭이 이 이름으로 칸을 세운다.
materials = material_table_for({"rows": []}, {}, entered)["rows"]
board = [row for row in materials if row["name"] == "국가지점번호판"]
assert len(board) == 1
assert (board[0]["unit"], board[0]["net_amount"], board[0]["supply"]) == (
"개소",
3.0,
"contractor_supplied",
)
# 개소를 안 넣은 공종 없는 줄은 자재로 안 감(수량이 없음).
assert not [row for row in materials if row["name"] == "임도 안내판"]
def test_표_머리가_두_갈래를_따로_센다() -> None: