Files
Aislo/resources/tester/test_342_2_chain_once.py
T
eomsangdonandClaude Opus 5.5 a44fd98adf feat(765-3): 전처리 체인 = 지형마다 두 벌 — 다른 지형 먼저 짓고 묶음으로 떠 둠 → 설계 지형 → 추천 미리 셈 한 번 · 배수 늘 다시 셈 · 비우기에 묶음 · 죽은 run_redesign_chain 걷음
- run_preprocess_chain: WF1 자동 확정 · 서피스 바꿈 체인이 부름 · 다른 지형 없음 · 실패 = 한 벌 + meta.json 까닭 · 예상노선(공유)은 설계 지형 벌이 씀
- 자동 체인 배수 refresh=True — 저장분이 노선 바뀐 줄 모르던 틈 막음
- purge_output_folders 가 design_sets 도 지움
- run_redesign_chain(앱에서 부르는 곳 0) 걷음 — 시험 정리: test_342_2 의 그 함수 시험 셋 지움(함수 없음) · test_763_3 · test_351_1 은 두 벌 체인으로 · test_74 · test_user_values_survive 의 이월 차례 검사는 살아 있는 자리(B05_Profile_Route_Save)로 옮김
- 시험 test_765_design_sets 에 체인 차례 · 한 벌 · 다른 벌 실패 · 비우기 넷 덧

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 15:47:20 +09:00

53 lines
2.1 KiB
Python

# -*- coding: utf-8 -*-
"""342-2 자동 체인 재계산 한 번 · 3D 는 [저장]·[확정] 끝.
③ 자동 체인은 서버 재계산 · 3D 짓기를 따로 부르지 않음 — [확정](confirm_sections) 끝 한 번씩 ·
재계산 → 짓기 차례 · [저장](save_sections)도 끝에 짓기.
(①② 노선 [확인] 체인 `run_redesign_chain` 시험 셋은 그 함수를 걷어(765-3 · 부르는 곳 0) 함께 지움.)
"""
from __future__ import annotations
import re
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
def _body(source: str, name: str) -> str:
start = source.index(f"async def {name}(")
following = re.search(r"\n(async def|def|@router)", source[start + 10 :])
return source[start : start + 10 + following.start()] if following else source[start:]
def test_자동_체인은_재계산_짓기를_따로_안_부름():
source = (ROOT / "B03_FileInput" / "B03_FileInput_Service_Chain.py").read_text("utf-8")
auto = _body(source, "run_auto_design_chain")
assert "recompute_server_side" not in auto
assert "prebuild_corridor" not in auto
assert "confirm_sections(" in auto
def test_확정_저장_끝에서_재계산_뒤_짓기():
source = (ROOT / "B06_Section" / "B06_Section_Router_Confirm.py").read_text("utf-8")
for name in ("confirm_sections", "save_sections"):
body = _body(source, name)
assert body.count("_recompute_stored_designs(") == 1, name
assert body.count("_prebuild_corridor(") == 1, name
assert body.index("_recompute_stored_designs(") < body.index("_prebuild_corridor("), name
confirm = _body(source, "confirm_sections")
# 측구 방향 역반영(종단 파일 고침)까지 끝난 뒤 짓기
assert confirm.index("_merge_uphill_overrides_into_longitudinal") < confirm.index(
"_prebuild_corridor("
)
def test_브라우저는_3D_를_올리지_않음():
source = (ROOT / "B05_Profile" / "B05_Profile_UI_Corridor.ts").read_text("utf-8")
assert '"PUT"' not in source
assert "putStored" not in source