From 71666a8633e39c115780debb33f3c7ae3168ae67 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Wed, 30 Sep 2026 19:44:48 +0900 Subject: [PATCH] =?UTF-8?q?test(M01):=20=EC=A1=B0=ED=95=A9=20=EC=8B=9C?= =?UTF-8?q?=ED=97=98=20=EC=82=AC=EB=B3=B8=EC=9D=B4=20=EC=A0=95=EB=B3=B8=20?= =?UTF-8?q?=EB=A7=88=EC=8A=A4=ED=84=B0=20=EB=A8=B8=EB=A6=AC=20=E3=80=8C?= =?UTF-8?q?=ED=8F=B4=EB=8D=94=E3=80=8D=EB=A5=BC=20=EC=95=88=20=EB=AC=BC?= =?UTF-8?q?=EB=A0=A4=EB=B0=9B=EC=9D=8C=20=C2=B7=20=EC=A0=95=EB=B3=B8=20?= =?UTF-8?q?=ED=8F=B4=EB=8D=94=20=EC=9D=B4=EB=A6=84=EC=97=90=20=EC=95=88=20?= =?UTF-8?q?=EA=B8=B0=EB=8C=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - test_m01_combo · test_m02_combo_branch · test_m02_combo_layers(master_copy) — 사본 조합 파일에서 「폴더」 뺌(사용자 화면 편집 9f69ebe2 뒤 빨강) - 마스터 나무 시험은 사본 첫 폴더 이름을 읽어 씀(「실무 일위대가」 박지 않음) - 정본 마스터 파일은 안 고침 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BU9gbNE3aWFUvE61pS2WGt --- resources/tester/test_m01_combo.py | 1 + resources/tester/test_m02_combo_branch.py | 1 + resources/tester/test_m02_combo_layers.py | 17 +++++++++++------ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/resources/tester/test_m01_combo.py b/resources/tester/test_m01_combo.py index f309acf7..6c793c1e 100644 --- a/resources/tester/test_m01_combo.py +++ b/resources/tester/test_m01_combo.py @@ -48,6 +48,7 @@ def client(tmp_path: Path, monkeypatch) -> TestClient: own = tmp_path / mcb.FILE # 정본의 견본 조합이 시험 줄 수에 끼지 않게 사본은 비워 시작 data = json.loads(own.read_text(encoding="utf-8")) data["줄"] = [] + data.pop("폴더", None) # 사용자가 화면으로 만든 빈 폴더 목록(정본 머리)도 안 물려받음 own.write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8") monkeypatch.setattr(store, "FOLDER", tmp_path) app = FastAPI() diff --git a/resources/tester/test_m02_combo_branch.py b/resources/tester/test_m02_combo_branch.py index 304fff54..e430fae0 100644 --- a/resources/tester/test_m02_combo_branch.py +++ b/resources/tester/test_m02_combo_branch.py @@ -42,6 +42,7 @@ def client(tmp_path, monkeypatch): own = master / combo_store.FILE data = json.loads(own.read_text(encoding="utf-8")) data["줄"] = [] + data.pop("폴더", None) # 정본 머리의 빈 폴더 목록은 안 물려받음 own.write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8") monkeypatch.setattr(m01, "FOLDER", master) template = tmp_path / "template" diff --git a/resources/tester/test_m02_combo_layers.py b/resources/tester/test_m02_combo_layers.py index c8113cd7..7796b80d 100644 --- a/resources/tester/test_m02_combo_layers.py +++ b/resources/tester/test_m02_combo_layers.py @@ -200,6 +200,10 @@ def master_copy(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> Path: for path in m01.FOLDER.glob("*.json"): if not path.name.startswith("_") or path.name == m01.mk.BOOK.name: shutil.copy(path, folder / path.name) + own = folder / combos.FILE # 정본 머리의 빈 폴더 목록(사용자 화면 편집)은 안 물려받음 + data = json.loads(own.read_text(encoding="utf-8")) + data.pop("폴더", None) + own.write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8") monkeypatch.setattr(m01, "FOLDER", folder) return folder @@ -211,15 +215,16 @@ def test_마스터_나무는_M01_저장_길_빈_폴더는_머리_틀_검사_통 got = _tree(admin, "system", op="rename", 키=first, 이름="이름 바꾼 견본") assert next(r for r in got["줄"] if r["키"] == first)["이름"] == "이름 바꾼 견본" before = _list(admin, "system") - assert ["실무 일위대가"] in before["폴더"] + old = next(r["구분"] for r in before["줄"] if r["구분"]) # 정본 폴더 이름에 기대지 않음 + assert [old] in before["폴더"] _tree(admin, "system", op="add-folder", 경로=[], 이름="빈 폴더") - got = _tree(admin, "system", op="rename", 경로=["실무 일위대가"], 이름="실무") - assert ["실무"] in got["폴더"] and ["빈 폴더"] in got["폴더"] - assert ["실무 일위대가"] not in got["폴더"] + got = _tree(admin, "system", op="rename", 경로=[old], 이름="시험 폴더") + assert ["시험 폴더"] in got["폴더"] and ["빈 폴더"] in got["폴더"] + assert [old] not in got["폴더"] doc = json.loads((master_copy / combos.FILE).read_text(encoding="utf-8")) assert ["빈 폴더"] in doc["폴더"] - assert sum(r["구분"] == "실무" for r in doc["줄"]) == len( - [r for r in before["줄"] if r["구분"] == "실무 일위대가"] + assert sum(r["구분"] == "시험 폴더" for r in doc["줄"]) == len( + [r for r in before["줄"] if r["구분"] == old] ) assert m01.cm.check_form(combos.FILE, doc) == [] # 마스터 틀 그대로 _tree(_as(world), "system", 403, op="add-folder", 경로=[], 이름="막힘")