Files
Aislo/resources/tester/test_473_lane_ready.py
T
eomsangdonandClaude Opus 5.5 f4a7b183b0 fix(평면): 새 구조물 측점 놓는 즉시 평면 비탈 끝 · 면적 = 저장 뒤 — 튐 없음 · 옮김 계획고 (PLAN 583-1 · 요구 441)
- 원인: 구조물을 새 측점에 놓으면 측점 갈아끼움(비동기)이 끝나기 전 묶음 cross 단계가 옛 상세를 봐 엔진 길로 빠짐 — 구조물 얹기 없는 한 차례(벽 측점 비탈 끝 35 · 55 m · 기존 벽 측점 18.96 m)가 약 80 ms 평면에 튐 · 다음 차례(0.25 s)에 저장 값
- design_shared savedCross = 도는 갈아끼움(swapInFlight)을 기다려 그 상세로 다시 셈 · 상세 가게 swapInFlight 새로
- 종단도 listed() 옛 측점 = 저장 정본 상세 — 갈아끼운 상세로 셈해 옮긴 구조물 옛 측점 꼭짓점이 안 옮겨져 계획고 최대 2.4 cm 갈리던 것(옮김 면적 차 0.17 → 0.0175 ㎡)
- 시험: test_272_swap_keeps_canon 에 도는 갈아끼움 기다림 · test_473_lane_ready 글 대조를 새 호출 꼴로

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 15:05:16 +09:00

71 lines
2.8 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""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")
# 옛 측점 = 저장 정본 상세(583) · 심기 전 = null(저장분 그대로)
assert "savedSectionDetail(projectId, routeId)) || detail," in profile
assert "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