fix(m02-df): 표 범위 칸에 숫자 하나(아래 = 위)면 「같음」 — 브레인 정함

- 아래 ≠ 위는 지금대로(아래 < 값 ≤ 위 · 빈 끝 열림) · 견치돌 「높이 4」 같은 줄이 맞음
- 시험 — 저장 다시 셈 4 → 0.7 줄 · apply_rule 4 / 3.5 / 3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KmELpdXFDRZHhfbGuRhSmL
This commit is contained in:
2026-10-01 20:01:27 +09:00
co-authored by Claude Opus 5.5
parent 868dc8e37f
commit 39c0d163ff
2 changed files with 21 additions and 1 deletions
+18
View File
@@ -547,6 +547,24 @@ def test_선_규칙_끝수_재료_조건_설계_때_정할_것(client: TestClien
assert _d(
_post(client, "/api/m02/df/save", {"logic": lg})["values"]["ports"]["f"]["합"]
) == int(Decimal("0.5") + 33000 + 3)
lg["boxes"][0]["input"]["variables"][0]["example"] = (
"견치돌" # 「높이 4」 줄 = 아래 = 위 → 같음(정함)
)
lg["boxes"][0]["input"]["variables"][1]["example"] = 4
assert _d(
_post(client, "/api/m02/df/save", {"logic": lg})["values"]["ports"]["f"]["합"]
) == int(Decimal("0.7") + 33000 + 4)
lookup = {
"kind": "lookup",
"col": "석공",
"conds": [{"col": "높이", "from": {"box": "v", "name": "높이"}}],
}
block = [["높이·아래", "높이·위", "석공"], [4, 4, 0.7], [None, 3, 0.5]]
assert [cf.dc.apply_rule(lookup, block, {"높이": h})[0] for h in (4, 3.5, 3)] == [
0.7,
None,
0.5,
]
lg["boxes"][0]["input"]["variables"][2]["example"] = "D999" # 맞는 재료 없음
lg["boxes"][0]["input"]["variables"][0]["example"] = "없는돌" # 표에 없는 조건 → 함수 멈춤
bad = _post(client, "/api/m02/df/save", {"logic": lg})["values"]