Files
Aislo/resources/tester/test_444_culvertopt_single_draft.py
T
eomsangdonandClaude Opus 5.5 a59259ef21 fix(444 B06 관 구간값): 세월교 · BOX 폼 값 = 관 초안 한 벌 · 옛 예약은 관 옮김 따라감 · 못 맞춘 값 버림
- 세월교 · BOX 조정 제어가 폼 값을 조정 예약(culvertopt)에 또 담지 않음 — 관 초안(가게 pipes)이 관 id 로 옮김 · 노선 바뀜을 따라감(H4a)
- 측점 갈아끼움 옮김 목록에 culvertopt 추가 — 옛 세션 잔값도 관 새 자리로
- 내보내기 주석 — 못 맞춘 값은 다른 관에 안 얹고 버림
- 시험 test_444_culvertopt_single_draft — 옮김 · 두 번째 [저장] 값 그대로(H4b) · 못 맞춘 값 버림

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VmC34fsxxbweEG3RUjs3Mn
2026-10-18 18:54:30 +09:00

89 lines
3.0 KiB
Python

"""444 관 구간값(H4a · H4b) — 세월교 · BOX 폼 값은 관 초안 한 벌 · 옛 예약은 관을 따라가고 못 맞추면 버림.
- 폼이 낸 세월교 · BOX 값(관경 · 수량 · 월류 폭 · 날개벽)은 관 초안(가게 pipes)으로만 나감 — 조정 예약
(culvertopt)에 또 담지 않음(test_b06_adjust_single_form 규칙 · 관 id 로 옮김 · 노선 바뀜을 따라감).
- 옛 세션 예약(culvertopt)은 관 옮김(측점 갈아끼움)을 따라 새 자리로 · [저장] 때 못 맞춘 값은 버림(지운 관
자리에 온 다른 관에 안 얹힘) · 두 번째 [저장]은 다시 안 보냄(값 그대로).
짝: `helper_444_culvertopt.mjs`(444 진입점 묶음 · 진짜 상세 가게 · 내보내기).
"""
import json
import shutil
import subprocess
import sys
from pathlib import Path
import pytest
HERE = Path(__file__).resolve().parent
ROOT = HERE.parents[1]
if str(HERE) not in sys.path:
sys.path.insert(0, str(HERE))
import test_365_page_pipeline as t365 # noqa: E402
pytestmark = t365.pytestmark
@pytest.fixture(scope="module")
def out(tmp_path_factory) -> dict:
work = tmp_path_factory.mktemp("b444")
build = subprocess.run( # noqa: S603 — 고정 실행 파일
[
"node",
str(ROOT / "config" / "node_modules" / "vite" / "bin" / "vite.js"),
"build",
"--configLoader",
"runner",
"--ssr",
"../resources/tester/helper_444_entry.ts",
"--outDir",
str(work),
"--logLevel",
"error",
],
cwd=ROOT,
capture_output=True,
text=True,
encoding="utf-8",
timeout=300,
)
assert build.returncode == 0, build.stderr
bundle = work / "bundle.mjs"
shutil.copy(work / "helper_444_entry.js", bundle)
proc = subprocess.run( # noqa: S603 — 고정 실행 파일
["node", str(HERE / "helper_444_culvertopt.mjs"), str(bundle)],
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_세월교_BOX_폼_값은_조정_예약에_안_쌓음() -> None:
ford = (ROOT / "B06_Section" / "B06_Section_UI_Page_Ford_Controls.ts").read_text(
encoding="utf-8"
)
controls = (ROOT / "B06_Section" / "B06_Section_UI_Page_Station_Controls.ts").read_text(
encoding="utf-8"
)
assert "queuePipeOptions" not in ford
assert "queuePipeOptions" not in controls
def test_관_옮김_예약도_새_자리로(out):
assert out["moved"] == {"50.00": {"ford_width_m": 4}}
def test_두_번째_저장은_값_그대로(out):
assert out["firstSave"] == {"puts": 1, "width": 4, "left": None}
assert out["secondSave"] == {"puts": 1, "width": 4}
def test_못_맞춘_값은_다른_관에_안_얹고_버림(out):
assert out["unmatched"] == {"puts": 1, "width": 4, "left": None}