Files
Aislo/resources/tester/test_780_1_sangeun_outside.py
eomsangdonandClaude Opus 5.5 48848bb287 refactor(785-7): 옛 맞춤 층 Python 지움 · 서버 새 길로 정리 · 낡은 시험 정리
- 지움(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>
2026-11-05 01:15:20 +09:00

45 lines
2.3 KiB
Python

"""780-1 일위대가 밖 단가산출도 잇기(요구 627) — 판정 · 확인 = 모든 블록 · `부름 [호표 번]`([] = 일위대가 밖) ·
밖 블록 확인 = 단위 SK(이름 · 단위 = 블록 것 · 근거 없음) · 빈 블록(줄 0) = 「줄 없음」 확인해도 못만듦 ·
하위 밖 블록(울진소광 492 → 83) = 확인 목록에 함께 넣으면 하위 먼저 만듦 · 칠 재료 `줄` · `어긋남` 모든 블록 ·
여덟 파일 블록 459 판정 오류 0(빈 블록은 모두 밖 = 일위대가 안 판정 그대로). 층 = 임시 폴더 · 마스터 읽기만.
"""
from __future__ import annotations
import json
from M02_MasterTemplete import M02_Hopyo_Sangeun as sangeun
from M02_MasterTemplete import M02_Hopyo_SkUnit as skunit
from M02_MasterTemplete import M02_Hopyo_Units as units
from M02_MasterTemplete import M02_Template_Layers as layers
from resources.tester import helper_m02_hopyo_golden as golden
from resources.tester.test_m02_hopyo_excel import URL, _post, client, master_hash # noqa: F401
BLOCKS = {"북부청임도": (95, 49), "북부청사방": (67, 45), "거창": (61, 13), "봉화": (65, 31)}
BLOCKS |= {"동부청영월": (69, 35), "울진대흥": (47, 14), "영덕계류": (15, 2), "울진소광": (40, 17)}
def _sks(folder) -> dict[str, dict]:
return {p.stem: json.loads(p.read_bytes()) for p in (folder / "sangeun").glob("SK-*.json")}
def _ready(client, tag="북부청임도"):
path = golden.FILES[tag]
key = _post(client, data=path.read_bytes(), name=path.name).json()["키"]
folder = layers.personal_dir(7, 42)
return folder, key, f"{URL.format('personal')}/{key}/sangeun"
def test_여덟_파일_모든_블록_판정():
us = units.Units()
for tag, (n, called) in BLOCKS.items():
hp = golden.read(tag)
blocks, first = sangeun.calls(hp)
call = sangeun.callers(hp)
assert (len(blocks), len(first)) == (n, called), tag
assert {b for b in blocks if call.get(b)} == set(first), tag # 부름 = 첫 줄과 같은 블록
for no, block in blocks.items():
got = skunit.judge(block, us, lambda sub: None, None, str(block.get("단위") or ""))
if not block.get("항목"): # 빈 블록 = 모두 밖
assert no not in first and got["판정"] == skunit.EMPTY, (tag, no)