- 곡선마다 내림 · 올림 측점 후보 · 뒤 곡선이 측점 위거나 맞춰지는 쪽 고름 - 무작위 노선 30 개 20 m 걸음 측점 밖 막힘 141 → 25 · 놓은 뒤 측점 밖 43 → 0 - 시험 test_454_arrow_station_step 추가 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
36 lines
1.2 KiB
Python
36 lines
1.2 KiB
Python
"""454(433-21 ②) 방향키 측점 No. 20 m 걸음 막힘 — 곡선 맞춤이 후보 측점 둘(내림 · 올림) + 뒤 곡선
|
|
앞보기로 고름. 무작위 노선 열 개 · 교점마다 네 방향 = 520 누름(`helper_454_arrow_station_step.cjs`).
|
|
고치기 전 측점 밖 막힘 48 · 처음 맞춤 측점 밖 2 · 놓은 뒤 측점 밖 43 → 6 · 0 · 0.
|
|
|
|
./venv/Scripts/python.exe -m pytest resources/tester/test_454_arrow_station_step.py -q
|
|
"""
|
|
|
|
import json
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
HELPER = Path(__file__).with_name("helper_454_arrow_station_step.cjs")
|
|
|
|
|
|
@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:
|
|
assert got["press"] == 520
|
|
|
|
|
|
def test_측점_밖_막힘_줄어듦(got) -> None:
|
|
assert got["offBlock"] <= 10
|
|
|
|
|
|
def test_처음_맞춤_놓은_뒤_측점_밖_없음(got) -> None:
|
|
assert got["offStart"] == 0 and got["offAfterRelease"] == 0
|