- 지움(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>
56 lines
2.5 KiB
Python
56 lines
2.5 KiB
Python
"""779-2 불러오기 엑셀 하이라이트 재료 — 목록 `줄상태` 수 = 줄 수 · 상태 = 1차 줄 판정(785-7 · `Judge.view`) ·
|
|
`hopyo-marks` 길 읽기만(층 폴더 파일 변화 0) · 블록 판정 = 블록 풀이 저장본(셈 전 None) · SK = 만든 것."""
|
|
|
|
import hashlib
|
|
|
|
from M02_MasterTemplete import M02_Template_Layers as layers
|
|
from resources.tester.test_m02_hopyo_excel import NORTH, URL, _post, client # noqa: F401
|
|
|
|
# ruff: noqa: F811
|
|
KEY = "HP-000001"
|
|
|
|
|
|
def _tree(root) -> dict[str, str]:
|
|
return {
|
|
str(p.relative_to(root)): hashlib.sha256(p.read_bytes()).hexdigest()
|
|
for p in sorted(root.rglob("*"))
|
|
if p.is_file()
|
|
}
|
|
|
|
|
|
def _ready(client):
|
|
res = _post(client, data=NORTH.read_bytes(), name=NORTH.name)
|
|
assert res.status_code == 200 and res.json()["키"] == KEY
|
|
return layers.personal_dir(7, 42)
|
|
|
|
|
|
def test_줄상태_수_줄_수_1차_판정_같음(client):
|
|
_ready(client)
|
|
base = URL.format("personal")
|
|
whole = client.get(f"{base}/{KEY}").json()
|
|
assert len(whole["호표"]) == 68 and whole["셈"]["끝"] is False # 뒤 셈 안 돌림(시험)
|
|
for h in whole["호표"][:4]:
|
|
one = client.get(f"{base}-judge/{KEY}/{h['번']}").json()["줄"]
|
|
assert len(h["줄상태"]) == len(one) == h["맞춤"][1], h["번"]
|
|
assert [x[1] for x in h["줄상태"]] == [r["판정"] for r in one]
|
|
assert [x[2] for x in h["줄상태"]] == [r["판정"] == "제안 있음" for r in one]
|
|
assert h["맞춤"][0] == sum(x[2] for x in h["줄상태"]) and h["만든"] is None
|
|
assert [x[0] for x in h["줄상태"]] == list(range(len(h["줄상태"])))
|
|
assert whole["맞춤"][1] == 415
|
|
|
|
|
|
def test_marks_읽기만_셈_전_판정_없음(client):
|
|
folder = _ready(client)
|
|
base = URL.format("personal")
|
|
before = _tree(folder)
|
|
got = client.get(f"{base}-marks/{KEY}")
|
|
assert got.status_code == 200, got.text
|
|
rows = got.json()["블록"]
|
|
assert _tree(folder) == before # 읽기만 — 파일 변화 0
|
|
assert rows and [r["번"] for r in rows] == sorted(r["번"] for r in rows)
|
|
assert all(r["판정"] is None and r["고를수"] is None for r in rows) # 블록 풀이 셈 전
|
|
assert all(r["SK"] is None and r["갈래"] is None and r["못옮김"] == [] for r in rows)
|
|
# 778-5 D-6 — 엑셀 셈 어긋남 덧칸(780-1 모든 블록) · 2 · 33 = 엑셀 합이 줄 뺌 · 4 … 78 = 일위대가 밖
|
|
assert {r["번"] for r in rows if r["어긋남"]} == {2, 33, 64, 95, 4, 44, 48, 77, 78}
|
|
assert client.get(f"{base}-marks/HP-999999").status_code in (404, 400)
|