Files
Aislo/resources/tester/test_717_2a_sangeun_list.py
T
eomsangdonandClaude Opus 5.5 f6c9008550 test(855-E 2-E4 ㉮-3): test_717_2a 목록 줄 견본을 새 꼴 SK 로 — 옛 칸 견본 걷음
- test_sangeun_row_base_edits_users: 3a7320ac7(855 L2 ⓑ-3 · 옛 칸 SK 겹침 = 못 펼침 OLD_WHY) 뒤부터 빨강 — 옛 칸(덮개 · 뺀줄 · 더한줄) 견본 SK 를 바탕 참조로 펼치지 못해 목록 줄 바탕이 SK 키로 나옴
- 살아 있는 뜻(목록 줄 바탕 = 기초 「키 이름」 · 바탕 참조 SK 도 저장 때 펼쳐 기초 이름 · 쓰는곳수 · 제목 · 단위 · 바탕 없음 = None)을 새 꼴 견본(바탕 로직만)으로 · 옛 칸 고친 줄 수(2 · 3) 단언 지움

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 13:55:43 +09:00

54 lines
2.3 KiB
Python

"""M02 단가산출 칸 목록 줄(PLAN 717-2a · `M02_Labor_Ref.summary` sangeun 갈래) — 임시 storage.
바탕 = 로직 「키 이름」 · 참조 = SK 키 · 없음 = None · 고친 줄 수 = 덮개 + 더한줄 + 뺀줄 ·
쓰는 곳 수 = 그 SK 를 바탕 · 더한줄로 담은 문서 수 · 일위대가(precombo) 줄엔 안 붙음.
"""
from M01_MasterData import M01_MasterData_Store as m01
from M02_MasterTemplete import M02_Labor_Ref as refs
from M02_MasterTemplete import M02_MasterTemplete_Store as store
from M02_MasterTemplete.M02_Labor_Expand import Expand
from resources.tester.test_m02_labor_ref import MINE, world # noqa: F401 — 같은 임시 층
PCT = "GC001109"
def _sk(folder, **doc):
with store.at(folder):
return refs.create("sangeun", {"이름": "목록 시험", "단위": "㎡", "더한줄": [], **doc})[
"이름"
]
def _row(folder, kind, key):
return refs.summary(folder, kind, key, Expand(m01.loaded()[1]))
def test_sangeun_row_base_edits_users(world):
"""새 꼴 SK(바탕 로직 · 고침 = 수식 문서) — 옛 칸(덮개 · 뺀줄 · 더한줄) 견본은 855 L2 ⓑ-3
(3a7320ac7 · 옛 칸 SK 겹침 = 못 펼침) 뒤 걷음."""
mine = world["personal"]
a = _sk(mine, 바탕={"로직": PCT})
from M01_MasterData import M01_MasterData_Doc as m01_doc
name = m01_doc.docs()[PCT]["이름"] # 기초 이름 = 수식 문서(855 L3)
row = _row(mine, "sangeun", a)
assert row["바탕"] == f"{PCT} {name}".strip()
assert row["고친줄수"] == 0 and row["쓰는곳수"] == 0
assert row["제목"] == "목록 시험" and row["단위"] == "㎡"
# 바탕 참조 SK(740-1) = 저장 때 펼쳐 담음 → 바탕 = 기초 · 쓰는 곳 0
b = _sk(mine, 바탕={"참조": {**MINE, "키": a}})
assert _row(mine, "sangeun", b)["바탕"] == f"{PCT} {name}".strip()
assert _row(mine, "sangeun", a)["쓰는곳수"] == 0
# 바탕 없음
c = _sk(mine)
row_c = _row(mine, "sangeun", c)
assert row_c["바탕"] is None and row_c["고친줄수"] == 0
def test_precombo_row_has_no_sangeun_fields(world):
with store.at(world["personal"]):
sc = refs.create("precombo", {"이름": "조합", "담은로직": []})["이름"]
row = _row(world["personal"], "precombo", sc)
assert not {"바탕", "고친줄수", "쓰는곳수"} & set(row)