diff --git a/resources/tester/test_802_4b1_import_doc.py b/resources/tester/test_802_4b1_import_doc.py index c37488920..6794b5d33 100644 --- a/resources/tester/test_802_4b1_import_doc.py +++ b/resources/tester/test_802_4b1_import_doc.py @@ -155,8 +155,11 @@ def test_stmate_nested_is_sibling_link(world) -> None: assert dim.run(root, doc)["계"] == 67383 == made["검산"]["엑셀"]["계"] assert dim.run(root, _ours(doc))["셈됨"] is True sub = _read(inner["키"]) # 안쪽 단가 줄 하나 두 배 → 바깥이 따라감(엑셀 기준도) - one = next(x for x in sub[imp.KEY]["로직"]["호표"] if "단가" in x) - one["단가"] = one["단가"] * 2 + one = sub[imp.KEY]["로직"]["호표"][0] # 단가 한 칸 · 값 묶음(노 · 재 · 경) 한 줄 둘 다 있음 + if "단가" in one: + one["단가"] = one["단가"] * 2 + else: + one["값묶음"] = {k: v * 2 for k, v in one["값묶음"].items()} store.write("sangeun", inner["키"], store.read("sangeun", inner["키"])["판"], sub) now = dim.run(dim.derive(_read(inner["키"])), _read(inner["키"]))["계"] assert now != 7528 diff --git a/resources/tester/test_m01_cache.py b/resources/tester/test_m01_cache.py index 39a1eaa5e..f0bfa7fdd 100644 --- a/resources/tester/test_m01_cache.py +++ b/resources/tester/test_m01_cache.py @@ -17,6 +17,7 @@ import pytest from fastapi import FastAPI from fastapi.testclient import TestClient +from M01_MasterData import M01_MasterData_Parts as parts from M01_MasterData import M01_MasterData_Router as router_module from M01_MasterData import M01_MasterData_Store as store @@ -57,6 +58,8 @@ def test_세어_둔_막힘이_줄마다_검사한_것과_같다(client: TestClie rows = { str(r.get("키")): r for _, d in files.items() if d.get("그룹") == "로직" for r in d["줄"] } + for key in parts.parts(): # 부품 문서(813-2)는 목록에서 뺌 — 키로 열기 · 셈은 그대로 + rows.pop(key, None) assert len(listed) == len(rows) for one in listed: reasons = store.cm.mf.check_logic(whole, rows[one["키"]])[0] diff --git a/resources/tester/test_m01_text.py b/resources/tester/test_m01_text.py index 9e41359ca..9fb8460d8 100644 --- a/resources/tester/test_m01_text.py +++ b/resources/tester/test_m01_text.py @@ -418,6 +418,9 @@ def test_자동값으로_모든_로직을_돌려도_멈추지_않는다() -> Non if mt.mf.mk.GROUP_OF.get(key[:2]) != "로직": continue given = {n: store._dec(v) for n, v in store.auto(key)["값"].items()} + # 고르기가 빈 입력 = 내 기계 · 불러오기 전용 식(M01 정본 기계가 안 씀) — 자동값 고를 것이 없음 + if any(i.get("고르기") == [] for i in master.logic(key).get("입력", [])): + continue try: mt.lines(files, key, given) except mt._CALC_ERRORS as e: