Files
Aislo/resources/tester/test_494_1_idle_queue.py
T
eomsangdonandClaude Opus 5.5 7978579313 fix(494-1 구조물 측점 횡단 형상): B06 화면 밖 카드 = 쉬는 틈 한도 · B05 횡단 판 = 들어올 때 고른 측점
- 원인 B06 = 구조물을 놓으면 새 측점 카드가 빈 설계로 먼저 서고 다시 셈 뒤 화면 밖 카드는 쉬는 틈 줄에서만 갈아 끼움 · 시간 제한이 없어 틈이 안 오는 창(ORCA 내장 · 가려진 창)에서는 설계선 · 옹벽 없는 카드가 그대로 남음(검증_sub1 옹벽 7+5 · 7+10 재현 · 다시 셈 값은 맞음)
- 고침 = createIdleQueue 쉬는 틈 한도 200 ms(늦어도 그 안에 그림)
- 원인 B05 = 「횡단」 판이 고름 바뀜만 들어 고른 구조물을 들고 들어오면 빈 판 · 다시 누르면 고름이 풀림
- 고침 = 판 만들 때 지금 고름을 한 번 따라감(판은 안 폄)
- 시험 test_494_1_idle_queue(쉬는 틈 없는 창 흉내 · 들어올 때 고름 · 고치기 전 빨강) · helper_411_a 에 readSelection 흉내 · 들어옴 장면

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 12:54:12 +09:00

54 lines
2.0 KiB
Python

"""PLAN 494-1 — B06 화면 밖 횡단 카드가 쉬는 틈이 안 와도 다시 그려지는가.
구조물을 놓으면 새 측점 카드가 빈 설계로 먼저 서고, 다시 셈 뒤 화면 밖 카드는 쉬는 틈 줄
(`createIdleQueue`)에서 갈아 끼움. 쉬는 틈이 안 오는 창(ORCA 내장 · 가려진 창)에서는 줄이 영영 안
비어 설계선 · 구조물 형상이 없는 카드가 남았음. 짝: `B06_Section/B06_Section_UI_Section_Common.ts`.
실제 TS 를 `helper_494_idle_queue.cjs` 가 Node 로 돌린다.
"""
from __future__ import annotations
import json
import os
import subprocess
HERE = os.path.dirname(__file__)
def _run() -> dict:
proc = subprocess.run( # noqa: S603 — 고정 실행 파일
["node", os.path.join(HERE, "helper_494_idle_queue.cjs")],
capture_output=True,
text=True,
encoding="utf-8",
timeout=60,
)
assert proc.returncode == 0, proc.stderr
return json.loads(proc.stdout)
def test_쉬는_틈이_없어도_줄의_카드를_모두_그린다() -> None:
out = _run()
assert out["ran"] == [145, 150, 155, 160, 165]
assert out["left"] == []
def test_늦어도_1초_안에_다_그린다() -> None:
"""카드 다섯 · 두 장씩 = 세 번 — 시간 제한 안에 끝남."""
assert _run()["elapsedMs"] <= 1000
def test_B05_평면_횡단판은_들어올_때_이미_고른_측점을_그린다() -> None:
"""B05 「횡단」 판 — 고른 구조물을 들고 들어오면 빈 판이었음(다시 누르면 고름이 풀림).
`_RouteEdit_Cross` 진짜를 `helper_411_a_cross_structure.cjs` 가 돌림(⑧)."""
proc = subprocess.run( # noqa: S603 — 고정 실행 파일
["node", os.path.join(HERE, "helper_411_a_cross_structure.cjs")],
capture_output=True,
text=True,
encoding="utf-8",
timeout=120,
)
assert proc.returncode == 0, proc.stderr
got = json.loads(proc.stdout)["entryPick"]
assert got == {"station": "45", "foot": "횡단 45", "structure": True}