Files
Aislo/resources/tester/test_384_3_planted_base.py
T
eomsangdonandClaude Opus 5.5 80cfc187c6 feat(B05·B06 한 페이지): 페이지 자료 줄 · 묶음 입력 = 가게만 (386-2 · 386-3)
- design_page_data 새로 — 저장분(구조물 · 관 · 정의 판 확인) 페이지에서 한 번 · 저장 정본 바뀜(invalidate) · 페이지 떠남에 비움 · 보기 전환 요청 0
- 묶음 · 두 보기 구조물 칸 · 초안 측점이 같은 줄 · 「계산 중」 점(도크 · 묶음 차례 동안)
- 묶음 planline 저장 기준 = 입력(관 · 구조물)이 심는 측점(design_pipeline_base · 페이지가 옵션으로) · baseMoved 지움 · 종류 한 벌
- design_pipeline_page 700줄 앞 쪼갬(design_pipeline_page_types)
- 시험 test_384_2 · test_384_3 · 엄격 흉내 helper 에 자료 줄 더함

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

92 lines
3.4 KiB
Python

"""PLAN 386-3 sub7 — 묶음 입력 = 가게만(보기 측점 심기 · baseMoved 지움).
못박는 것
- 묶음 planline 저장 기준 = 저장 상세 + 지금 입력(관 · 구조물)이 심는 측점(`plantedBase` · 보기와 같은 셈) —
종류 = 정의 전부(꺼진 종류도 심음) · 상세가 없으면 종단도 기준.
- 보기가 종단도에 늦게 심어도(종단도 기준이 바뀌어 restart) 묶음은 안 돎 · 열 때 1 · 같은 입력 0.
- `baseMoved` 없음 · 페이지(design_shared)가 옵션으로 넘김(묶음은 화면 모듈을 안 끌어옴).
짝: `helper_384_3_entry.ts` + `helper_384_3_planted.mjs`(진짜 모듈 · vite ssr) · `helper_365_page_pipeline.cjs` ⑬.
"""
from __future__ import annotations
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))
from test_365_page_pipeline import r # noqa: E402,F401 — 묶음 시험 한 벌(⑬ 늦게 심은 측점)
@pytest.fixture(scope="module")
def planted(tmp_path_factory) -> dict:
work = tmp_path_factory.mktemp("b386")
build = subprocess.run( # noqa: S603 — 고정 실행 파일
[
"node",
str(ROOT / "config" / "node_modules" / "vite" / "bin" / "vite.js"),
"build",
"--configLoader",
"runner",
"--ssr",
"../resources/tester/helper_384_3_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_384_3_entry.js", bundle)
proc = subprocess.run( # noqa: S603 — 고정 실행 파일
["node", str(HERE / "helper_384_3_planted.mjs"), str(bundle)],
capture_output=True,
text=True,
encoding="utf-8",
timeout=120,
)
assert proc.returncode == 0, proc.stderr
return json.loads(proc.stdout)
def test_저장_기준_입력이_심는_측점(planted):
assert [c for _, c in planted["none"]] == [0, 20, 40, 60] # 심을 것 없음 = 저장 상세 측점
assert ["irregular", 33] in planted["pipe"] # 구조물 자리
assert ["irregular", 33] in planted["both"] and ["irregular", 47] in planted[
"both"
] # 꺼진 종류도
assert planted["noDetail"] is True # 상세 없음 = 종단도 기준
assert planted["pvi"] == 2
def test_늦게_심어도_안_돎(r):
late = r["late"]
assert late["openRuns"] == 1 # 열 때 1
assert late["lateRuns"] == 0 # 종단도 기준이 바뀌어도(보기가 늦게 심음) 안 돎
assert late["same"] == 0 and late["sameRuns"] == 0 # 같은 입력 0
assert late["planted"] is not None # planline 이 입력(관)으로 기준을 셈
def test_baseMoved_없음_옵션은_페이지가():
pipe = (ROOT / "A00_Common/design/design_pipeline_page.ts").read_text(encoding="utf-8")
shared = (ROOT / "A00_Common/design/design_shared.ts").read_text(encoding="utf-8")
assert "baseMoved" not in pipe
assert "design_pipeline_base" not in pipe # 묶음은 화면 모듈을 안 끌어옴
assert "options.plantedBase?.(savedSource(), at, types)" in pipe
assert "plantedBase, //" in shared