fix(b08): 자재총괄 화면·인계를 한 벌로 — material_table_for 가 규준틀 재료까지 얹고 두 라우터가 같이 부름(화면 6줄·인계 9줄 갈림 닫음)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BW6Jdsh18WPtYUR6THZJqn
This commit is contained in:
@@ -85,6 +85,28 @@ def test_자재_축으로_간다() -> None:
|
||||
assert all(row["destination"] == "material" for row in frame_material_rows(규준틀))
|
||||
|
||||
|
||||
def test_화면과_인계가_같은_한_벌을_부른다() -> None:
|
||||
"""자재총괄 화면(6줄)·인계(9줄)가 갈리던 자리 — 규준틀 재료를 한 곳에서 얹음(2026-09-14).
|
||||
|
||||
⚠ 두 라우터가 이 함수를 부르는지까지 본다 — 한쪽이 옛 길로 돌아가면 다시 갈림.
|
||||
"""
|
||||
import inspect
|
||||
|
||||
from B08_Quantity import B08_Quantity_Router_Material as router
|
||||
|
||||
table = router.material_table_for(
|
||||
{"structures": []},
|
||||
{"material_supply": {"각재 50×50": "owner_supplied"}},
|
||||
{"rows": 규준틀},
|
||||
)
|
||||
keys = {row["supply_key"]: row for row in table["rows"]}
|
||||
assert set(keys) == {"각재 50×50", "판재 T12", "못"}
|
||||
assert keys["각재 50×50"]["supply"] == "owner_supplied" # 화면에서 고른 값이 먹음
|
||||
for route in (router.get_material_summary, router.get_handoff):
|
||||
source = inspect.getsource(route)
|
||||
assert "material_table_for(" in source and "build_material_table(" not in source
|
||||
|
||||
|
||||
def test_제안값이_실무_관측값과_같다() -> None:
|
||||
"""울진 소광 §8 — 각재 50×50 0.0044㎥ · 판재 T12 0.0029㎥ · 못 0.03㎏(개소당)."""
|
||||
assert FRAME_MATERIAL_SUGGESTED["각재 50×50"][0] == 0.0044
|
||||
|
||||
Reference in New Issue
Block a user