Files
Aislo/resources/tester/test_387_4b_pipe_options.py
T
eomsangdonandClaude Opus 5.5 111dd6a1d0 fix(387-4b): 관 옵션 → 횡단 조정값을 상세 가게가 얹음 — B05 만 연 면적 = B06 연 뒤
- 관 벽 높이 · 형태(조정 h · m) · 흙막이 n 단(h · m · 구간)을 layPipeOptions 가 얹음(관 초안 ?? 저장 관)
- 상세 가게 읽기 · 다시 셈 창구(관 옵션을 고친 뒤 묶음 cross)에서 부름 — 예전에는 B06 보기가 열릴 때만
- 새 test_387_4b_pipe_options(상세 가게 얹기 = B06 폼 되보내기 · 면적 같음 · 옵션 바꿔도)

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

50 lines
2.0 KiB
Python

"""387-4b 관 옵션 → 횡단 조정값을 상세 가게가 얹음 — B05 만 연 면적 = B06 연 뒤 면적(관 옵션을 바꿔도).
· 관 벽 높이 · 형태(조정 h · m) · 흙막이 n 단(h · m)을 상세 가게(`layPipeOptions`)가 얹은 값 = B06 폼 되보내기
(`applyPipeOptionsToCache`)가 얹은 값 · 구조물 면적도 같음
· 부르는 곳 = 상세 가게 읽기(새로고침 · 처음 열기) + 다시 셈 창구(관 옵션을 고친 뒤 묶음 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);" in refresh