Files
Aislo/resources/tester/test_b08_ground_alias.py
eomsangdonandClaude Opus 5 d7cb14f416 test(B08): tmp/tests 중 tester 에 없던 47 개를 resources/tester 로 옮김
tmp/ 가 창끼리 안 건너가는 것이 확정돼(랩탑이 시간 두고 두 번 확인) 시험·예외가
저절로 건너가도록 git 안으로 옮김. 사용자 확정.

- 내용은 하나도 안 고침 — 자리만 옮김. tmp/tests 는 남겨 둠.
- 같은 이름이 이미 있던 64 개는 랩탑 것을 그대로 두고 건너뜀.
- helper_b05_*.js 둘은 랩탑이 .cjs 로 이미 올린 것과 **줄바꿈만 다른 같은 내용**이라
  복사본을 도로 뺌(시험이 .cjs 를 부름).
- resources/tester/ 에서 전체 1176 통과 · 29 건너뜀 · 실패 0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-09 17:15:57 +09:00

41 lines
1.7 KiB
Python

"""갈래 이름 별칭 — 우리 「리핑암」 ↔ 일위대가 「파쇄암」 (2026-09-08).
⚠ 겨누는 것 넷
① 인계본에 별칭이 실린다 — 받는 쪽이 이름만 달라 못 붙이던 자리(도자 운반 ≒ 30만원)
② ⚠ 갈래 이름 **자체는 안 바뀐다** — 흙깎기(FP-09-04)가 「리핑암」으로 서 있다
③ 근거가 데이터에 적혀 있다(품셈 10-11 f 「파쇄암 1/1.35」 = 10-12 [주]③ 「암절취 1.35」)
④ 별칭 표가 비어도 인계본은 그 칸을 갖는다(빈 칸과 없는 칸을 가른다)
"""
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_Handoff import build_handoff, load_mapping # noqa: E402
from B08_Quantity.B08_Quantity_Engine_Handoff_Mapping import WorkItemMapping # noqa: E402
def test_인계본에_별칭이_실린다() -> None:
aliases = build_handoff()["ground_class_aliases"]
assert "파쇄암" in aliases["리핑암"]["names"]
def test_갈래_이름_자체는_안_바뀐다() -> None:
"""⚠ 이름을 갈면 흙깎기 매핑(FP-09-04 리핑암)이 어긋난다 — 잇기만 한다."""
mapping = load_mapping()
assert mapping.for_earthwork("흙깎기", "리핑암")["work_item_code"] == "FP-09-04"
assert mapping.for_earthwork("흙깎기", "파쇄암") is None
def test_근거가_데이터에_적혀_있다() -> None:
basis = load_mapping().ground_aliases["aliases"]["리핑암"]["basis"]
assert "10-11" in basis and "10-12" in basis and "1.35" in basis
def test_표가_비어도_칸은_있다() -> None:
assert build_handoff(mapping=WorkItemMapping())["ground_class_aliases"] == {}