노임표에 없는 직종명을 유사 직종으로 바꿔 읽는 자리를 공종 단위로 둠(FP-13-02-04 한 곳). 산출기초에 준용 근거(재경원 회계 45101-45) 표시. 뒷길이 다섯 × 밑수 둘, 일위대가 10벌이 새로 섬. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DJffo4VwgTumVUM3kdbJzd
49 lines
1.9 KiB
Python
49 lines
1.9 KiB
Python
"""유사 직종 바꿔쓰기 — 야면석 채집 「인 부」 → 보통인부 (2026-09-13 · 사용자 확정 8-1).
|
|
|
|
⚠ 겨누는 것 셋
|
|
① 야면석 채집(13-2-4)의 「인 부」가 **못 붙은 줄에서 빠지고** 보통인부 노임으로 붙는다
|
|
② 바꿔쓰기는 **그 공종에만** 걸린다 — 전역 별칭이 아니다
|
|
③ 산출기초에 **준용 근거**가 함께 뜬다(조용히 바꾸지 않음)
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
sys.path.insert(0, str(ROOT))
|
|
|
|
from B09_Estimation.B09_Estimation_BasisSheet import work_item_basis # noqa: E402
|
|
from B09_Estimation.B09_Estimation_ResourceAxis_UnitBasis import ( # noqa: E402
|
|
SIMILAR_OCCUPATION,
|
|
similar_occupation_note,
|
|
)
|
|
from B09_Estimation.B09_Estimation_UnitPrice import cached_build # noqa: E402
|
|
|
|
CODE = "FP-13-02-04"
|
|
|
|
|
|
def test_인부가_보통인부로_붙는다() -> None:
|
|
build = cached_build()
|
|
assert "인 부" not in build.unattached.get(CODE, [])
|
|
titles = [code for code in build.book.titles if code.startswith(f"B-{CODE}#")]
|
|
# 뒷길이 다섯 × 밑수 둘(㎡당·㎥당)
|
|
assert len(titles) == 10, titles
|
|
for code in titles:
|
|
names = {build.book.title(d.ref_code).name for d in build.book.details.get(code, [])}
|
|
assert "보통인부" in names, (code, names)
|
|
assert build.book.resolve(code).labor > 0
|
|
|
|
|
|
def test_바꿔쓰기는_그_공종에만_걸린다() -> None:
|
|
assert {code for code, _ in SIMILAR_OCCUPATION} == {CODE}
|
|
assert similar_occupation_note("FP-12-10") == ""
|
|
|
|
|
|
def test_산출기초에_준용_근거가_뜬다() -> None:
|
|
rows = [row for row in work_item_basis(cached_build()) if row["code"].startswith(f"B-{CODE}#")]
|
|
assert rows
|
|
for row in rows:
|
|
assert any("보통인부 준용" in note and "45101-45" in note for note in row["notes"]), row
|