Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013rJwJMVL4EE31y77TB11AP
47 lines
1.7 KiB
Python
47 lines
1.7 KiB
Python
"""91 원지반 · 암 제약 삭제 · 유출측 복합경사.
|
|
|
|
화면 TS 를 그 자리에서 돌린 값(`helper_91_ground_free.cjs`) · 픽스처 = 73-4 세월교 173.09 · 박스 352.14 · 관 180.
|
|
"""
|
|
|
|
import json
|
|
import subprocess
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
if str(ROOT) not in sys.path:
|
|
sys.path.insert(0, str(ROOT))
|
|
|
|
HELPER = Path(__file__).parent / "helper_91_ground_free.cjs"
|
|
NODE_MODULES = ROOT / "config" / "node_modules"
|
|
|
|
pytestmark = pytest.mark.skipif(not NODE_MODULES.is_dir(), reason="프론트엔드 의존성 미설치")
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def fit() -> 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)
|
|
|
|
|
|
def test_세월교_바닥_자동은_하상을_따라감(fit: dict) -> None:
|
|
for before, after in zip(fit["fordAuto"], fit["fordAutoBedDown"]):
|
|
assert after["slabTop"] < before["slabTop"] - 1.0
|
|
|
|
|
|
def test_세월교_바닥_손_값은_원지반을_바꿔도_그대로(fit: dict) -> None:
|
|
assert fit["fordHand"] == fit["fordHandBedDown"]
|
|
# 손 값 = 측벽 높이 · 흙막이 바닥 = 바닥판 밑(두께 0.3)
|
|
for side in fit["fordHand"]:
|
|
assert side["wallBottom"] == pytest.approx(side["slabTop"] - 0.3, abs=1e-3)
|
|
|
|
|
|
def test_세월교_박스_칸은_측벽_높이_줄을_받음() -> None:
|
|
dock = (ROOT / "B06_Section/B06_Section_UI_Adjust_Dock.ts").read_text(encoding="utf-8")
|
|
assert "sideSlots?.wingOutlet) return WALL_HEIGHT_ROW" in dock
|