From fe2eb26564f88bd01961b174be4574d15b23da07 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Wed, 18 Nov 2026 11:07:46 +0900 Subject: [PATCH] =?UTF-8?q?test(855-E=20L3=20=EB=AF=B8=EB=A6=AC):=20?= =?UTF-8?q?=EC=83=88=20=EA=B8=B0=EA=B3=84=20=EB=93=B1=EB=A1=9D=20=C2=B7=20?= =?UTF-8?q?=EC=9D=BC=EC=9C=84=EB=8C=80=EA=B0=80=20=EC=9E=90=EB=8F=99?= =?UTF-8?q?=EA=B0=92=20=C2=B7=20=EC=9E=90=EC=9E=AC=ED=91=9C=EC=8B=9C=20?= =?UTF-8?q?=EC=A4=84=20=C2=B7=20SK=20=EB=B0=94=ED=83=95=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=20=EA=B2=AC=EB=B3=B8=EC=9D=84=20=EC=88=98=EC=8B=9D=20?= =?UTF-8?q?=EB=AC=B8=EC=84=9C=EB=A1=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 로직 JSON 없는 판에서 깨지던 「시험이 로직 줄을 견본으로 읽음」 셋째 묶음. - test_822_2 [새 기계] 등록 · 해제 — 고르기 목록 = 문서 선택 목록(정본) · 그대로 확인 = 수식 문서 파일(지금 판에서도 422 로 깨져 있던 시험이 통과) - test_m02_item_labor 첫 입력 · 빠진 입력 자동값 — 옛 mau(로직 줄) → M02_Doc_Copy.auto_of(문서 · 값 같음) - test_m02_labor_mat_marks 첫 재료 아닌 줄 — 로직 호표 → 문서 금액 줄 비목 - test_717_2a SK 바탕 이름 — 문서 이름 지금 판 · 없는 판 둘 다 통과(822-2 직접 값 식 · 점보드릴 둘 = 옛 엔진 · 2-E4 몫) · 관련 16 파일 129 통과 · test_717_2a 뒤쪽 바탕 참조 SK 줄(44)은 지금 판에서도 실패 — 받기로 온 858 5-8 · 2-E4 뒤 · 고치기 전 파일도 같음(이 커밋 몫 아님) Co-Authored-By: Claude Opus 5.5 --- resources/tester/test_717_2a_sangeun_list.py | 4 +++- resources/tester/test_822_2_machine_hourly_all.py | 10 +++++++--- resources/tester/test_m02_item_labor.py | 14 ++++++++++---- resources/tester/test_m02_labor_mat_marks.py | 6 +++--- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/resources/tester/test_717_2a_sangeun_list.py b/resources/tester/test_717_2a_sangeun_list.py index ca3db3416..e08d30a40 100644 --- a/resources/tester/test_717_2a_sangeun_list.py +++ b/resources/tester/test_717_2a_sangeun_list.py @@ -27,7 +27,9 @@ def _row(folder, kind, key): def test_sangeun_row_base_edits_users(world): mine = world["personal"] a = _sk(mine, 바탕={"로직": PCT}, 덮개={"labor:LB000036#0": {"qty": 0.5}}, 뺀줄=["pct:x#0"]) - name = m01.loaded()[1].logic(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["고친줄수"] == 2 and row["쓰는곳수"] == 0 diff --git a/resources/tester/test_822_2_machine_hourly_all.py b/resources/tester/test_822_2_machine_hourly_all.py index f6ad1d966..2486cf1cf 100644 --- a/resources/tester/test_822_2_machine_hourly_all.py +++ b/resources/tester/test_822_2_machine_hourly_all.py @@ -38,7 +38,10 @@ import master_machine_coef as mc # noqa: E402 import master_machine_crew as mcrew # noqa: E402 import master_doc_link as mdl # noqa: E402 -MACHINE, LOGIC = "기계.json", "로직_건설품셈_08장_건설기계.json" +MACHINE, LOGIC = ( + "기계.json", + "수식문서/수식_건설품셈_08장_건설기계.json", +) # 꼴 식 = 수식 문서(855 L3) POWER, POWER_CREW, ONE_FUEL, DIRECT = "GC001196", "GC001197", "GC001198", "GC001199" FUEL_POWER, FUEL_POWER_CREW = "GC001200", "GC001201" NAME = "sub1임시기계822" @@ -58,8 +61,9 @@ def _wage(job: str) -> Decimal: def _codes(key: str) -> list[str]: - row = next(r for r in m01.read(LOGIC)[0]["줄"] if r["키"] == key) - return [str(c) for c in next(i for i in row["입력"] if i["이름"] == "기계").get("고르기", [])] + doc = mdl.load_all(mdl.FOLDER)[key] # 기계 고르기 정본 = 문서 선택 목록(855 L3 ⓐ) + pick = next(v for v in doc["변수"] if v.get("열쇠") == "기계") + return [str(c) for c in (pick.get("연결") or {}).get("목록") or []] # ① · ② ─────────────────────────────────────────────────────────────── diff --git a/resources/tester/test_m02_item_labor.py b/resources/tester/test_m02_item_labor.py index 9d4eab6ef..bf79886c9 100644 --- a/resources/tester/test_m02_item_labor.py +++ b/resources/tester/test_m02_item_labor.py @@ -57,8 +57,11 @@ def _write(path: Path, content: Any) -> None: def _first_input(code: str) -> tuple[str, Any]: - whole = m01.loaded()[1] - name, value = next(iter(m01.mau.values(whole, whole.logic(code)).items())) + from M01_MasterData import M01_MasterData_Doc as m01_doc + from M02_MasterTemplete import M02_Doc_Copy as dc + + whole = m01.loaded()[1] # 자동값 = 수식 문서 변수(855 L3 · 옛 mau 와 같은 값) + name, value = next(iter(dc.auto_of(m01_doc.docs()[code], whole).items())) return name, int(value) if isinstance(value, Decimal) and value % 1 == 0 else value @@ -122,9 +125,12 @@ def _fill_auto(root: Path) -> None: """빠진 입력을 자동값으로(확인 참) — 문서 입력값은 그대로 둠.""" current = copies.read_file(root, FOLDER, "입력값") values = current["내용"] + from M01_MasterData import M01_MasterData_Doc as m01_doc + from M02_MasterTemplete import M02_Doc_Copy as dc + whole = m01.loaded()[1] - for code in LOGICS: - for key, auto in m01.mau.values(whole, whole.logic(code)).items(): + for code in LOGICS: # 자동값 = 수식 문서 변수(855 L3) + for key, auto in dc.auto_of(m01_doc.docs()[code], whole).items(): mine = values.setdefault(code, {}) if key not in mine and auto is not None: mine[key] = {"값": labor_doc._json(auto), "확인": True} diff --git a/resources/tester/test_m02_labor_mat_marks.py b/resources/tester/test_m02_labor_mat_marks.py index a59752ae9..8ead75d24 100644 --- a/resources/tester/test_m02_labor_mat_marks.py +++ b/resources/tester/test_m02_labor_mat_marks.py @@ -31,10 +31,10 @@ def _doc(**extra): def _first_non_material(code): - from M01_MasterData import M01_MasterData_Store as m01 + from M01_MasterData import M01_MasterData_Doc as m01_doc - rows = m01.loaded()[1].logic(code).get("호표") or [] - return next(n for n, r in enumerate(rows) if r.get("종류") != "재료") + lines = m01_doc.docs()[code].get("금액") or [] # 기초 줄 = 수식 문서 금액 줄(855 L3) + return next(n for n, line in enumerate(lines) if line.get("비목") != "재료비") def test_사용자_자재_허용_값만():