- 지움(git rm) 10 파일 3,374 줄: M02_Hopyo_Finger · Ours · Option · Fit · Combine · Verdict · Line · SkLink · SkPatch · Basis
- Match: 흐름 몫(candidates · name_cands · fix_typo · clause · b_order · _logic_specs · _line_mod · units_of · _state · view · guess · picks · chain) 지움 · 이름 도구 몫 · line_key 남김
- Words: conds · cond_score · close · cosine · jacc 지움 / Shares: sections 지움(trade · eq_key 남김)
- 옮김: Finger.kind_of → Fixed.kind_of · SkLink(sk_line · kept · left · LEFT · WHY) → Sangeun · SkPatch 기계 몫(MACH_IN · MACHINE · SOLO · _mach_logics) → Units.mach_logics
- Sangeun: 옛 /sangeun 몸(build · _sure · Maker.basis · judge · plan · make) 지움 · Kids: first · proposal · order 지움 · Build: build() · unlinked() 지움(모두 고정 Builder · build_all · _order · _origins 남김)
- Router: 옛 길 지움(GET hopyo/{키}/{번} · guess · hopyo-picks · hopyo-build · hopyo-unlinked · hopyo/{키}/sangeun) · GET hopyo/{키} = Judge.view(1차 줄 판정 줄상태 · 만든 · 블록 풀이 셈)
- Marks: 칠 = Judge.judged 만 · Forget: 맞춤 캐시 지움 줄 걷음 · Ledger: Ours.version 판 칸 걷음 · Item: Kids.first 걷음
- Row(덧): 단산 줄 = 장부 짝이 있어도 늘 「2차 필요」(장부 = 1차 후보 힌트만)
시험 정리(까닭 = 지운 길 · 모듈만 시험함):
- 지움 11 파일: test_m02_hopyo_finger · fit · golden · option · ours · basis · seam · flow · draft_calc · test_635 · test_628(지문 · 순위 · 옵션 거꾸로 · 맡은 절 · 옛 확인 흐름)
- 함수 지움: /sangeun · /hopyo-build · /hopyo-unlinked · hopyo-picks · 옛 줄 맞춤 보기를 부르던 것(572 · 718_1 · 729 · 739_1 · 777_1 · 778_5 · 780_1 · labor_national · 705_3 · m02_hopyo_match · 746_1)
- test_621 S2(지문 해시) 지움 · S1 남김 · test_m02_hopyo_build = 장부 길 시험만(PUT 으로 심음)
- 새 길로: 779_2(줄상태 = 1차 판정 · 칠 셈 전 None) · grid · stmate(hopyo-judge 줄 판) · 778_1 · 778_2(Units.mach_logics) · 642_6(Marks 원문) · 642_3 장부 짝 단산 줄 2차 지킴
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
42 lines
1.9 KiB
Python
42 lines
1.9 KiB
Python
"""746-1 지킴 — 기계 줄 M01 요소 후보 · 남은 기계 줄 EQ 후보 · 단위 별칭(요구 585).
|
|
|
|
요소 후보 셋 · hr = 시간 · 개소 = 개(같은 성격). 쓰기 없음. 옛 고름 대기 줄비교(지문 · 판정)는 785-7 에서 지움.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
from M02_MasterTemplete import M02_Hopyo_Elem as elem
|
|
from M02_MasterTemplete import M02_Hopyo_Sangeun as sg
|
|
|
|
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "resources/master_data/scripts"))
|
|
import master_unit as mu # noqa: E402
|
|
|
|
|
|
def test_요소_후보_셋():
|
|
got = elem.labor("작업반장")
|
|
assert 0 < len(got) <= elem.TOP and {x["이름"] for x in got[:2]} == {"작업반장"}
|
|
assert all(x["키"].startswith("LB") and x["단가"] for x in got)
|
|
got = elem.machines("굴착기 0.7㎥")
|
|
assert got and all(x["키"].startswith("EQ") and "굴착기" in x["이름"] for x in got)
|
|
got = elem.materials("시멘트", "kg")
|
|
assert got and all(x["키"].startswith("MT") for x in got) and len(got) <= elem.TOP
|
|
lost = {"갈래": "기계", "이름": "굴착기", "규격": "0.7"}
|
|
assert elem.lost(lost)[0]["키"].startswith("EQ")
|
|
|
|
|
|
def test_안_이은_기계_줄_EQ_후보():
|
|
line = {"차례": 0, "이름": "굴착기(타이어)", "규격": "0.7㎥", "단위": "hr", "갈래": "기계"}
|
|
got = sg.left(line, None)
|
|
assert got["까닭"] == sg.WHY["기계"]
|
|
assert got["후보"] and all(x["키"].startswith("EQ") for x in got["후보"])
|
|
|
|
|
|
def test_단위_별칭_hr_시간_개소_개():
|
|
assert mu.plain("hr") == mu.plain("시간") and mu.plain("HR") == "시간"
|
|
assert mu.same_kind("개소", "개") and mu.swap("개소", "개")["배"] == 1
|
|
assert mu.swap("10개소", "개")["배"] == 10 and mu.swap("hr", "시간")["계수"] is None
|
|
assert mu.swap("조", "개소")["계수"] == "사용자" # 조는 묶음 밖 그대로
|