- 원인: 관 알림 전 「모름」을 빈 목록으로 심어 종단도 선이 저장 관 측점(389) 꼭짓점을 뺌 → 첫 cross 가 380 · 389 · 400 을 그 선으로 셈 → 배지 −211.6 ㎥ 1 초 남짓 뒤 −204.2(새로고침 20 번 중 1 ~ 2) - design_facility_lane known() · ready · design_profile planted · listedBase null = 저장 기준 · Render deriveProfile 서버 측점 그대로 · design_view_profile_sections stationsReady - 시험 test_473_lane_ready(옛 코드 빨강) · test_346_2 가짜 다리에 stationsReady · 위키 rules 한 줄 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
69 lines
2.7 KiB
Python
69 lines
2.7 KiB
Python
"""473 새로고침 누가토량 흔들림(요구 272) — 시설 줄 입력이 다 오기 전 측점을 심지 않음.
|
||
|
||
옛 흠 = 관 알림(배수유역 받기)이 종류 표 · 구조물보다 늦으면 시설 줄이 「모름」을 빈 목록으로
|
||
심음 → 종단도가 저장 관 측점(389)을 뺀 선으로 횡단 다시 셈 → 배지 −211.6 ㎥ 1 초 남짓 뒤 −204.2
|
||
(새로고침 20 번 중 1 ~ 2).
|
||
① 늦은 차례 — 관 알림 전 측점 안 씀 · 준비 아님 · 알림 뒤 한 번 [389]
|
||
② 빠른 차례 — 구조물 받기 전 안 씀 · 받은 뒤 한 번 [389](들어온 차례 무관 같은 결과)
|
||
③ 종단도 기준 — 심기 전(null) = 저장 기준 그대로
|
||
④ 종단도 · 측점 다시 그림이 준비 전 빈 목록을 안 심음(자리 글)
|
||
TS 셈은 `helper_473_lane_ready.cjs`.
|
||
|
||
./venv/Scripts/python.exe -m pytest resources/tester/test_473_lane_ready.py -q
|
||
"""
|
||
|
||
import json
|
||
import subprocess
|
||
from pathlib import Path
|
||
|
||
import pytest
|
||
|
||
ROOT = Path(__file__).resolve().parents[2]
|
||
HELPER = Path(__file__).with_name("helper_473_lane_ready.cjs")
|
||
|
||
pytestmark = pytest.mark.skipif(
|
||
not (ROOT / "config" / "node_modules" / "typescript").is_dir(),
|
||
reason="프론트엔드 의존성 미설치",
|
||
)
|
||
|
||
|
||
@pytest.fixture(scope="module")
|
||
def got() -> dict:
|
||
run = subprocess.run( # noqa: S603 — 고정 실행 파일
|
||
["node", str(HELPER)],
|
||
capture_output=True,
|
||
text=True,
|
||
encoding="utf-8",
|
||
timeout=120,
|
||
)
|
||
assert run.returncode == 0, run.stderr
|
||
return json.loads(run.stdout)
|
||
|
||
|
||
def test_관_알림_전_측점_안_심음(got) -> None:
|
||
late = got["late"]
|
||
assert late["beforePipes"] == {"writes": 0, "ready": False} # 옛 코드 = [] 를 먼저 심음
|
||
assert late["after"] == [[389]]
|
||
assert late["ready"] is True
|
||
|
||
|
||
def test_들어온_차례_무관_같은_측점(got) -> None:
|
||
early = got["early"]
|
||
assert early["beforeStructures"] == 0
|
||
assert early["after"] == got["late"]["after"]
|
||
|
||
|
||
def test_심기_전_종단도_기준_저장분(got) -> None:
|
||
assert got["listedNull"] is True
|
||
|
||
|
||
def test_준비_전_빈_목록_안_심는_자리() -> None:
|
||
profile = (ROOT / "A00_Common/design/design_profile.ts").read_text(encoding="utf-8")
|
||
assert "listedBase(storedBase, detail, planted ? irregularStations : null)" in profile
|
||
sections = (ROOT / "A00_Common/design/design_view_profile_sections.ts").read_text(
|
||
encoding="utf-8"
|
||
)
|
||
assert "if (deps.bridge().stationsReady())" in sections
|
||
render = (ROOT / "B05_Profile/B05_Profile_UI_Profile_Render.ts").read_text(encoding="utf-8")
|
||
assert "planted ? oneStationList(graphData.stations, injected) : graphData.stations" in render
|