Files
Aislo/resources/tester/test_433_4_mc_swap.py
T
eomsangdonandClaude Opus 5.5 e51dd2a801 fix(450 B06 측점 갈아끼움): MC 곡선 열쇠 이음 · 자리 같은 단면 서버 표본 유지 · 구간값 죽은 길 걷음 · 표 위 CAD 한도
- 433-4 갈아끼움이 curveMoves 거꾸로 맵으로 옛 MC 횡단을 이어 받음 — 설계 · 측점 id · moves 짝 남음
- 433-11 자리 · 축 같은 앞 단면은 지반 표본 · 상단측 · 중심고 그대로 — 덧 측점 넣기 · 빼기 뒤 누가토량 = 서버
- 433-19 Span_Control.update(culvertopt 큐) 걷음 — 구간 줄은 다단 벽만
- 433-20 표 위 CAD 요소 2000 넘음 = 초안에 안 씀 · 알림(서버 max_length 짝)
- 시험 test_433_4 · test_433_11 · test_433_19_20 새로 · 346_2 단언 · 440 헬퍼 로더 맞춤

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 21:34:51 +09:00

65 lines
2.0 KiB
Python

# -*- coding: utf-8 -*-
"""433-4 — 곡선 R 바꿔 MC 측점이 움직임(curve:47.35 → curve:49.10).
상세 갈아끼움이 옛 MC 횡단을 이어 받음.
못박는 것
- MC 설계(사용자 칸) 남음 · 측점 id 그대로 · added · removed 빔.
- moves 에 MC 짝(누가거리 열쇠 칸이 따라감).
- CURVE_NEAR_M 밖으로 간 MC = 못 이음(새 측점 · 옛 열쇠 removed).
Node 헬퍼 `helper_433_swap.cjs` 가 진짜 모듈(`B06_Section_Station_Swap.ts`)을 부름.
"""
import json
import subprocess
import sys
from pathlib import Path
import pytest
HERE = Path(__file__).resolve().parent
ROOT = HERE.parents[1]
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
from config.config_system import STANDARD_CROSS_SECTION # noqa: E402
from config.config_system_design import EARTHWORK_CONVERSION_FACTORS # noqa: E402
@pytest.fixture(scope="module")
def out(tmp_path_factory):
work = tmp_path_factory.mktemp("b433")
standard = work / "standard.json"
conversion = work / "conversion.json"
standard.write_text(json.dumps(STANDARD_CROSS_SECTION), encoding="utf-8")
conversion.write_text(json.dumps(EARTHWORK_CONVERSION_FACTORS), encoding="utf-8")
proc = subprocess.run(
["node", str(HERE / "helper_433_swap.cjs"), str(standard), str(conversion)],
cwd=ROOT,
capture_output=True,
text=True,
encoding="utf-8",
timeout=120,
)
assert proc.returncode == 0, proc.stderr
return json.loads(proc.stdout)
def test_MC_설계가_새_곡선_열쇠로_남음(out):
mc = out["mc"]
assert mc["memo"] == "MY-EDIT@47.35"
assert mc["stationId"] == "station_000000047350"
assert mc["added"] == []
assert mc["removed"] == []
def test_moves_에_MC_짝(out):
assert ["47.35", "49.10"] in out["mc"]["moves"]
def test_멀리_간_MC_는_못_이음(out):
far = out["mc"]["far"]
assert far["added"] == ["curve:62.00"]
assert far["removed"] == ["curve:47.35"]