- 저장 노선 측점을 갈아끼운 뒤 묶음이 다 돈 다음 cross 한 번 더(그 차례 cross 는 옛 상세 · 옛 화면 선을 봄) - 다시 셈 창구 앞에서 초안 형상을 다시 얹음(B06 폼 되보내기가 관 제원에 옵션 값을 그대로 써 최소 높이 · 집수정 쪽 칸이 서버와 갈림) - 화면(검증_sub4) B05 만 연 절토 · 성토 합 = B06 연 뒤 442.3726 · 824.768 · 관 옵션 2 → 2.1 뒤도 443.2174 같음 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014utrjfoW831Vc5wJUd13kL
56 lines
2.5 KiB
Python
56 lines
2.5 KiB
Python
"""387-4b 관 옵션 → 횡단 조정값을 상세 가게가 얹음 — B05 만 연 면적 = B06 연 뒤 면적(관 옵션을 바꿔도).
|
|
|
|
· 관 벽 높이 · 형태(조정 h · m) · 흙막이 n 단(h · m)을 상세 가게(`layPipeOptions`)가 얹은 값 = B06 폼 되보내기
|
|
(`applyPipeOptionsToCache`)가 얹은 값 · 구조물 면적도 같음
|
|
· 부르는 곳 = 상세 가게 읽기(새로고침 · 처음 열기) + 다시 셈 창구(관 옵션을 고친 뒤 묶음 cross · 관 제원도 형상
|
|
얹기 규칙으로 다시) · 저장 노선 측점 갈아끼운 뒤 cross 한 번 더
|
|
|
|
./venv/Scripts/python.exe -m pytest resources/tester/test_387_4b_pipe_options.py -q
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
HELPER = Path(__file__).parent / "helper_387_4b_pipe_options.cjs"
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def out() -> dict:
|
|
done = subprocess.run( # noqa: S603 — 고정 실행 파일
|
|
["node", str(HELPER)], cwd=str(ROOT), capture_output=True, text=True, encoding="utf-8"
|
|
)
|
|
assert done.returncode == 0, done.stderr
|
|
return json.loads(done.stdout)
|
|
|
|
|
|
@pytest.mark.parametrize("case", ["first", "changed", "tiers"])
|
|
def test_상세_가게_얹기_B06_되보내기와_같음(out: dict, case: str) -> None:
|
|
b06, store = out[case]["b06"], out[case]["store"]
|
|
assert store[2] == b06[2] # 조정값 칸 그대로
|
|
assert store[0] == pytest.approx(b06[0], abs=0.01) and store[1] == pytest.approx(
|
|
b06[1], abs=0.01
|
|
)
|
|
|
|
|
|
def test_옵션을_바꾸면_면적이_따라옴(out: dict) -> None:
|
|
assert out["first"]["store"][0] != out["none"][0]
|
|
assert out["changed"]["store"][0] != out["first"]["store"][0]
|
|
|
|
|
|
def test_부르는_곳() -> None:
|
|
store = (ROOT / "B06_Section/B06_Section_Section_Store.ts").read_text(encoding="utf-8")
|
|
refresh = (ROOT / "B06_Section/B06_Section_Cross_Refresh.ts").read_text(encoding="utf-8")
|
|
assert "await withPipeOptions(detail, projectId);" in store
|
|
assert "await withPipeOptions(input.detail, input.projectId, true);" in refresh
|
|
# 저장 노선 측점을 갈아끼운 뒤 — 묶음이 다 돈 뒤 cross 한 번 더(그 차례는 옛 상세를 봄)
|
|
body = store.split("function recrossSaved", 1)[1].split("\n}\n", 1)[0]
|
|
assert "await page.reconcilePagePipeline(projectId);" in body
|
|
assert "page.pipelineOwnsCross(projectId)" in body and "cross.forceCross();" in body
|
|
assert "recrossSaved(projectId, key, swap.detail);" in store
|