From bdaca728fecbb65339dd46721cde83f3f153a8ec Mon Sep 17 00:00:00 2001 From: umsangdon Date: Tue, 3 Nov 2026 16:12:24 +0900 Subject: [PATCH] =?UTF-8?q?fix(765-6):=20=EC=B4=88=EA=B8=B0=EA=B0=92=20?= =?UTF-8?q?=EC=82=AC=EB=B3=B8=20=C2=B7=20=EB=B3=B5=EC=9B=90=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=98=88=EC=83=81=EB=85=B8=EC=84=A0(=EA=B3=B5?= =?UTF-8?q?=EC=9C=A0)=20=EB=BA=8C=20=E2=80=94=20=EC=88=98=EC=B9=98?= =?UTF-8?q?=EC=A7=80=ED=98=95=EB=8F=84=20=EB=B2=8C=20[=EC=B4=88=EA=B8=B0?= =?UTF-8?q?=ED=99=94]=EA=B0=80=20=EB=9D=BC=EC=9D=B4=EB=8B=A4=20=EC=98=88?= =?UTF-8?q?=EC=83=81=EB=85=B8=EC=84=A0=EC=9D=84=20=EB=8D=AE=EB=8D=98=20?= =?UTF-8?q?=EA=B2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 검증_sub5 실측: 칩으로 수치지형도 벌 → [초기화] → 칩 라이다 뒤 예상노선이 수치지형도로 자른 것(643 점 · 2136.2 m)으로 남음 · 라이다로 자른 것 = 415 점 · 1377.4 m - 예상노선은 지형마다 벌이 있어도 하나(공유 · 추천이 씀) — 초기값 사본에 안 넣고 복원이 안 건드림(옛 사본 안 것도 건너뜀) - 시험 test_765_design_sets 에 덮지 않음 검사 덧 Co-Authored-By: Claude Opus 5.5 --- common_util/common_util_initial_snapshot.py | 4 +++- resources/tester/test_765_design_sets.py | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/common_util/common_util_initial_snapshot.py b/common_util/common_util_initial_snapshot.py index f36b0ddd2..a404952e6 100644 --- a/common_util/common_util_initial_snapshot.py +++ b/common_util/common_util_initial_snapshot.py @@ -172,7 +172,9 @@ def _copy_tree(source: Path, target: Path) -> None: #: 트리 안 공유 캐시(이름 앞머리) — 사본에 안 넣고 복원이 안 지움(765-6 · 지우면 다음 셈이 처음부터) _TREE_CACHES = { "B04_PreProcess/drainage": DRAINAGE_SHARED_PREFIXES, - "B05_Profile/route": ("cost_surface_",), # 추천 비용면 + # 추천 비용면 · 예상노선(공유 — 지형마다 벌이 있어도 하나 · 765 · 수치지형도 벌 [초기화]가 + # 라이다 예상노선을 덮던 것) + "B05_Profile/route": ("cost_surface_", "expected_route"), } diff --git a/resources/tester/test_765_design_sets.py b/resources/tester/test_765_design_sets.py index efc221693..fa91eda29 100644 --- a/resources/tester/test_765_design_sets.py +++ b/resources/tester/test_765_design_sets.py @@ -569,19 +569,21 @@ def test_복제가_묶음_안_지표면_id_고침(tmp_path: Path) -> None: assert sets.bundle_ready(tmp_path, "las", FP) # 지문은 id 를 안 봄 -def test_초기값_사본은_비용면도_빼고_복원이_안_지움(tmp_path: Path) -> None: +def test_초기값_사본은_비용면_예상노선도_빼고_복원이_안_건드림(tmp_path: Path) -> None: from common_util import common_util_initial_snapshot as snap _seed_files(tmp_path) asyncio.run(_save(snap, tmp_path)) stored = tmp_path / "initial_snapshot" / "B05_Profile__route" - assert not any(p.name.startswith("cost_surface_") for p in stored.iterdir()) - assert (stored / "expected_route.csv").is_file() # 예상노선은 그대로 뜸 + assert not any(p.name.startswith(("cost_surface_", "expected_route")) for p in stored.iterdir()) route = tmp_path / "B05_Profile" / "route" (route / "cost_surface_x_implicit.npz").write_text("c2", encoding="utf-8") (route / "plus_stations.json").write_text("[]", encoding="utf-8") + (route / "expected_route.csv").write_text("other-terrain", encoding="utf-8") snap.restore_snapshot_files(tmp_path) assert (route / "cost_surface_x_implicit.npz").read_text(encoding="utf-8") == "c2" + # 예상노선 = 공유 — 다른 벌 [초기화]가 덮지 않음 + assert (route / "expected_route.csv").read_text(encoding="utf-8") == "other-terrain" assert not (route / "plus_stations.json").exists() # 초기값에 없던 설계 파일 = 지움 assert (route / "structures.json").read_text(encoding="utf-8") == '{"items": [1]}'