Files
Aislo/old_code/resources/tester/test_b07_sheet_key_place.py
T
eomsangdonandClaude Opus 5 8472fc9f40 refactor(B08,B09): 폴더째 old_code 로 옮기고 빈 화면 둘만 남김 (PLAN 7-3)
B08_Quantity 86 · B09_Estimation 111 파일을 old_code/ 로 옮김(지우지 않음).
화면은 메뉴·주소·단계 막대만 남은 빈 틀 둘 — main.py 라우터 13 개는 끊음.
B07 이 빌려 쓰던 비탈 길이·면적은 필요한 함수만 B07_DesignDetail_Engine_SlopeGeometry
로 옮겨 적음(면적 적분·노면 면적·측점 묶음은 안 옮김) · 시험 하나를 새로 둠.
B07 구조물도 조립(Cad_StandardSheet)은 2026-09-13 에 이미 도면 목록에서 빠져
부르는 곳이 없어 old_code 로 같이 보냄 — 구조물 그림은 되살리지 않음.
B06 구조물 몫 조회는 빈 값으로 두어 화면이 그대로 서게 함.
B08·B09 를 부르던 시험 25 개도 old_code/resources/tester 로 옮김.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PAdA5ThqmtVSsbzjusk1cJ
2026-09-22 12:27:45 +09:00

29 lines
1.1 KiB
Python

"""표준도 장 나눔 — **자리 칸(앞뒤 걸침)은 장을 가르지 않는다** (2026-09-13).
장 나눔 축은 「제원 조합」이다(PLAN 4-3). 구간 규약의 `before_m`·`after_m` 는 기준 측점에서
앞뒤로 얼마나 걸치나일 뿐이라, 제원이 같은 두 기가 이 칸 때문에 두 장이 되면 안 된다.
"""
from __future__ import annotations
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
sys.path.insert(0, str(ROOT))
from B08_Quantity.B08_Quantity_Engine_StructureSheet import sheet_key # noqa: E402
def _stone(**options) -> dict:
return {"type_id": "masonry_wet", "height_m": 2.0, "options": {"back_len_cm": 45, **options}}
def test_앞뒤_걸침이_달라도_같은_장() -> None:
assert sheet_key(_stone(before_m=5, after_m=5)) == sheet_key(_stone(before_m=0, after_m=12))
assert sheet_key(_stone(outlet_revet_before_m=3)) == sheet_key(_stone())
def test_제원이_다르면_여전히_장이_갈린다() -> None:
assert sheet_key(_stone(before_m=5)) != sheet_key(_stone(before_m=5, back_len_cm=55))