"""411-A B05 평면 오른쪽 횡단 판 — 구조물 · 관을 골라도 그 측점 횡단(요구 252-6) · 옮긴 뒤에도 그 측점. TS 셈은 `helper_411_a_cross_structure.cjs`(Node · `_RouteEdit_Cross` 진짜 · 묶음 · 그림 가짜). ./venv/Scripts/python.exe -m pytest resources/tester/test_411_a_cross_structure.py -q """ import json import subprocess from pathlib import Path import pytest HELPER = Path(__file__).with_name("helper_411_a_cross_structure.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["structurePick"] == {"station": "45", "foot": "횡단 45", "structure": True} def test_옮긴_뒤_열쇠로_새_자리(got) -> None: assert got["structureMoved"] == {"station": "52", "foot": "횡단 52", "at": 52} def test_관_고름_그_측점_횡단(got) -> None: assert got["pipePick"] == {"station": "80.17", "foot": "횡단 80.17", "structure": True} def test_평면_마커_풂은_판_그대로(got) -> None: assert got["planRelease"] == {"station": "80.17", "foot": "횡단 80.17"} def test_일반측점_그대로(got) -> None: assert got["gridPick"] == {"station": "20", "foot": "횡단 20", "structure": None} def test_묶음_전_고름도_열쇠로_붙듦(got) -> None: assert got["beforePipeline"]["foot"] == "계산 중…" assert got["afterPipeline"] == {"station": "60", "foot": "횡단 60"} assert got["latchedMoved"] == {"station": "66", "foot": "횡단 66"} def test_다른_보기_풂은_판_비움(got) -> None: assert got["otherRelease"]["station"] == "" and got["otherRelease"]["watched"] is None