From d297d3384e1ff4221e1a02ec9bc6935daee3a552 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Thu, 1 Oct 2026 16:50:30 +0900 Subject: [PATCH] =?UTF-8?q?fix(m02-cf):=20=EA=B2=AC=EB=B3=B8=20=EC=9D=B8?= =?UTF-8?q?=EB=A0=A5=20=EC=9E=85=EB=A0=A5=20=EC=83=81=EC=9E=90=20=EB=8B=A8?= =?UTF-8?q?=EC=9C=84=20=EC=9B=90/=EC=9D=BC=20=C2=B7=20=EC=9A=94=EC=86=8C?= =?UTF-8?q?=20=EB=8B=A8=EC=9C=84=EA=B0=80=20=EA=B0=99=EC=9C=BC=EB=A9=B4=20?= =?UTF-8?q?=EC=83=81=EC=9E=90=20=EB=8B=A8=EC=9C=84=EB=A1=9C(=EC=8B=9C?= =?UTF-8?q?=ED=97=98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BU9gbNE3aWFUvE61pS2WGt --- M02_MasterTemplete/CostFlow/_sample/masonry.json | 2 +- resources/tester/test_m02_cf_sample.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/M02_MasterTemplete/CostFlow/_sample/masonry.json b/M02_MasterTemplete/CostFlow/_sample/masonry.json index 3182b5a6a..7ad4f5adb 100644 --- a/M02_MasterTemplete/CostFlow/_sample/masonry.json +++ b/M02_MasterTemplete/CostFlow/_sample/masonry.json @@ -86,7 +86,7 @@ "kind": "input", "name": "인력", "color": "#2f80ed", - "unit": "-", + "unit": "원/일", "x": 40, "y": 620, "input": { diff --git a/resources/tester/test_m02_cf_sample.py b/resources/tester/test_m02_cf_sample.py index 863354316..1312cd508 100644 --- a/resources/tester/test_m02_cf_sample.py +++ b/resources/tester/test_m02_cf_sample.py @@ -124,6 +124,9 @@ def test_견본_모양(name: str) -> None: assert len({i["cell"] for i in fn["inputs"]}) == len(fn["inputs"]) if b["kind"] == "output": assert b["output"]["cost"] in ("노무비", "재료비", "경비", "값") + units = {e["unit"] for e in (b.get("input") or {}).get("elements") or []} + if len(units) == 1: # 요소 단위가 모두 같으면 상자 단위도 그것(공통 단위 규칙) + assert b["unit"] == next(iter(units)), b["id"] for link in lg["links"]: a, z = boxes[link["from"]["box"]], boxes[link["to"]["box"]] assert link["from"]["name"] in _ports_out(a), link