- 세월교 흙막이 쪽 관 끝 = 흙막이 전면(관 invert 높이) · 바닥판 끝 = 배면 · 라벨 관 길이 - 세월교 관 길이 1 m 단위 — 기본 자리 올림만큼 흙막이를 바깥으로(유출 먼저) · 좌우 걸음 1 m - 박스 흙막이를 바깥으로 밀면 상판 · 저판 · 내공이 배면까지 따라감 - 흙막이 ↺ 가 캐시 사본(design.revet_adjust)까지 비움 — 옮긴 자리가 되살아나던 것 - 시험: test_80_ford_pipe(새) · test_73_4_body_guard 유출 벽 1 m 맞춤 반영 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C99ToP6eDSTba2XZRUumb8
66 lines
2.3 KiB
Python
66 lines
2.3 KiB
Python
"""80 세월교 · 박스 흙막이 — 세월교 안은 관이라 1 m 단위 · 관이 흙막이 안까지 · 흙막이를 옮기면 본체가 따라감.
|
|
|
|
화면 TS 를 그 자리에서 돌린 값(`helper_80_ford_pipe.cjs`) · 픽스처 = 73-4 세월교 173.09 · 박스 352.14.
|
|
"""
|
|
|
|
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_80_ford_pipe.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 _whole(length: float) -> bool:
|
|
return abs(length - round(length)) < 1e-3
|
|
|
|
|
|
def test_기본_자리_관_길이는_1m_단위(fit: dict) -> None:
|
|
for case in ("both", "inletOnly"):
|
|
assert _whole(fit[case]["lengthM"]), fit[case]
|
|
assert fit[case]["label"].endswith(f"L{round(fit[case]['lengthM'])}m")
|
|
|
|
|
|
def test_관은_흙막이_전면까지_바닥판은_배면까지(fit: dict) -> None:
|
|
for case in (fit[k] for k in ("both", "inletPlus1", "outletPlus2", "inletOnly")):
|
|
for side in case["sides"]:
|
|
if side["guard"]:
|
|
assert side["pipeGap"] == pytest.approx(0, abs=1e-3)
|
|
assert side["slabGap"] == pytest.approx(0, abs=1e-3)
|
|
|
|
|
|
def test_흙막이를_옮기면_관이_그만큼_따라감(fit: dict) -> None:
|
|
base = fit["both"]["lengthM"]
|
|
assert fit["inletPlus1"]["lengthM"] == pytest.approx(base + 1, abs=1e-3)
|
|
assert fit["outletPlus2"]["lengthM"] == pytest.approx(base + 2, abs=1e-3)
|
|
|
|
|
|
def test_흙막이_없는_쪽은_그대로(fit: dict) -> None:
|
|
assert [s["guard"] for s in fit["inletOnly"]["sides"]] == [True, False]
|
|
|
|
|
|
def test_박스도_흙막이를_밀면_본체가_따라감(fit: dict) -> None:
|
|
assert fit["boxAuto"]["gaps"] == [0, 0]
|
|
assert fit["boxInletPlus1"]["gaps"] == [0, 0]
|
|
assert fit["boxInletPlus1"]["bodyLengthM"] == pytest.approx(
|
|
fit["boxAuto"]["bodyLengthM"] + 1, abs=1e-3
|
|
)
|