손 편집 [저장]이 추천 갈래를 따라 균형 종단을 새로 풀어 사용자 계획고가 노선 전체에서 바뀌던 흠. 화면은 balanced_profile 안 보냄(profileShown 없앰) · 서버도 균형 종단은 as_initial(추천 [적용])일 때만. 계획고 옮김의 바뀐 구간 = 옛 계획 폴리라인(read_route_plan planned) 대 새로 쓴 계획 폴리라인 — 풀린 노선 geojson(점 간격 다름) 대신 화면 planline 단계와 같은 선. 거울 시험 test_349_0v. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ji4nuyLVHcxrXWHTdb5nRD
43 lines
1.9 KiB
Python
43 lines
1.9 KiB
Python
"""편집 창 종단 띠 — 없앰(345-5 · 아래 종단 판 종단 그래프가 그 몫) · [확인] 목표 셈 그대로.
|
|
|
|
./venv/Scripts/python.exe -m pytest resources/tester/test_75_profile_strip.py -q
|
|
"""
|
|
|
|
import asyncio
|
|
from pathlib import Path
|
|
from uuid import uuid4
|
|
|
|
from B05_Profile import B05_Profile_Router_RouteInitial as initial
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
B05 = ROOT / "B05_Profile"
|
|
|
|
|
|
def _read(name: str) -> str:
|
|
return (B05 / name).read_text(encoding="utf-8")
|
|
|
|
|
|
def test_띠_없음_화면_요청_서버_길():
|
|
assert not (B05 / "B05_Profile_UI_RouteEdit_ProfileStrip.ts").exists()
|
|
chrome = _read("B05_Profile_UI_RouteEdit_Chrome.ts")
|
|
assert "data-strip" not in chrome and "종단 띠" not in chrome
|
|
assert "routeedit__strip" not in _read("B05_Profile_UI_Style_RouteEdit.css")
|
|
editor = _read("B05_Profile_UI_RouteEdit.ts")
|
|
assert "ProfileStrip" not in editor and "strip." not in editor
|
|
# 손으로 고친 노선 [저장] = 균형 종단 안 보냄(349-0v) — 추천 [적용]만
|
|
assert "profileShown" not in editor
|
|
assert "profile-preview" not in _read("B05_Profile_Api_Replan.ts")
|
|
assert "is-tick" not in _read("B05_Profile_UI_RouteEdit_Recommend_Profile.ts")
|
|
assert not hasattr(initial, "profile_preview") and not hasattr(initial, "ProfilePreviewRequest")
|
|
paths = {getattr(r, "path", "") for r in initial.replan.router.routes}
|
|
assert not any(p.endswith("/route/profile-preview") for p in paths)
|
|
|
|
|
|
def test_확인_목표는_같은_셈의_측점_계획고(monkeypatch, tmp_path: Path) -> None:
|
|
async def profile_of(*_args):
|
|
return {"stations_m": [0.0, 20.0, 31.5], "plan_m": [5.0, 6.0, 6.5], "cut_m3": 1.0}
|
|
|
|
monkeypatch.setattr(initial, "balanced_profile_of", profile_of)
|
|
target = asyncio.run(initial.balanced_target(uuid4(), tmp_path, [], None))
|
|
assert target == ([0.0, 20.0, 31.5], [5.0, 6.0, 6.5])
|