fix(820-2): 시간당 이음 글 빈칸 든 입력 이름 따옴표 — 파워트로웰 EST main 504 번 오류 고침

- M02_San_Link.hourly_text 가 「전력 계약종별=…」 를 따옴표 없이 적어 가져온 식 읽기(_link)가 못 읽음 → 이름을 따옴표로(읽는 쪽은 이미 받음)
- 지킴 시험(test_820_1) 왕복 + EST main 504 번 = 저장 금액 · 우리 단가 셈 추가

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-12 06:07:14 +09:00
co-authored by Claude Sonnet 5.5
parent f1bc5fbec5
commit bce7e245e0
2 changed files with 22 additions and 1 deletions
+2 -1
View File
@@ -114,7 +114,8 @@ def hourly_text(key: str | None) -> str | None:
got = dim.hourly_link(key, "노무비")
if not got:
return None
return f"로직({got['키']}{''.join(f', {k}={v}' for k, v in got['입력'].items())})"
args = "".join(f", {dim._q(k)}={v}" for k, v in got["입력"].items()) # 빈칸 든 이름은 따옴표
return f"로직({got['키']}{args})"
def combo_link(one: dict, parts: list[dict]) -> str | None:
@@ -151,3 +151,23 @@ def test_other_docs_same() -> None:
assert pick[0] not in codes, row["키"]
old = [k for k, r in _eq().items() if k not in NEW]
assert not [k for k in old if str(_eq()[k].get("원문번호") or "").startswith("자체 ")]
def test_blank_input_name_link_roundtrip() -> None:
"""820-2 — 빈칸 든 입력 이름(「전력 계약종별」)이 이음 글 → 읽기 왕복 · EST main 504 번 = 저장 금액 · 우리 단가 셈."""
from M02_MasterTemplete import M02_San_Link as sl
from M02_MasterTemplete import M02_Sangeun_Imported as imp
text = sl.hourly_text("EQ000662")
assert "'전력 계약종별'=" in text
node = di.dc.cv.mf.parse(text)
assert node[0] == "logic" and "전력 계약종별" in [k for k, _ in node[2]]
assert imp._link(text, "로직", "시험", imp._whole()) == text
import test_810_2_native_doc as t
out = t.fn.emit(t.native("EST", "main"), 504)
sk, _, got = t.doc_and_money(out)
assert float(got["계"]) == 546 # 원파일 저장 금액
sk[imp.KEY]["단가기준"] = "우리"
ours = di.run(di.derive(sk, None, t.whole()), sk, t.whole())
assert ours.get("셈됨") is not False and ours["계"] is not None