- 지움(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>
31 lines
1.9 KiB
Python
31 lines
1.9 KiB
Python
"""기계 = 기계경비 기초 로직 줄(PLAN 778-2 · 분석 621-B 4-2) — SK 더한줄
|
|
`{종류: 로직, 로직: 기계경비 기초, 입력값: {기계: 기계 번호}}` 셈 됨 · 고르기 목록 밖 기계 = 서버 둘째 요청 ·
|
|
지은 문맥 밖 스레드에도 셈 됨(마스터를 셈에 넘김). master 읽기만. 옛 못옮김 잇기(`SkPatch._Plan.link`)는 785-7 에서 지움.
|
|
"""
|
|
|
|
import threading
|
|
|
|
from M01_MasterData import M01_MasterData_Store as m01
|
|
from M02_MasterTemplete import M02_Hopyo_Units as units
|
|
from M02_MasterTemplete import M02_Sangeun_Calc as calc
|
|
from M02_MasterTemplete import M02_Sangeun_Router as sangeun_router
|
|
from resources.tester.test_m02_hopyo_excel import client # noqa: F401
|
|
|
|
|
|
def test_목록_밖_기계_서버_둘째_요청에도_셈(client): # noqa: F811
|
|
m01.loaded() # 마스터 = 이 스레드에서 지음 · 요청 = 다른 스레드(문맥 안 따라감)
|
|
client.app.include_router(sangeun_router.router)
|
|
one = {"종류": "로직", "로직": "GC000268", "입력값": {units.MACH_IN: "0211-0060"},
|
|
"이름": "굴착기(타이어) 0.6㎥", "단위": "시간", "수량": 1} # fmt: skip
|
|
doc = {"키": "SK-000000", "이름": "t", "단위": "시간", "바탕": None, "입력값": {}, "덮개": {},
|
|
"뺀줄": [], "자재표시": {}, "더한줄": [one]} # fmt: skip
|
|
for _ in range(2):
|
|
got = client.post("/api/m02/layers/personal/sangeun/calc", json={"문서": doc})
|
|
assert got.status_code == 200, got.text
|
|
assert got.json()["기준"]["경비"] == 27120, got.json().get("까닭")
|
|
whole, out = m01.loaded()[1], {} # 지은 문맥 밖 스레드(서버 요청 스레드 풀과 같음)
|
|
run = threading.Thread(target=lambda: out.update(calc.run(doc, whole)))
|
|
run.start()
|
|
run.join()
|
|
assert out["기준"] and float(out["기준"]["경비"]) == 27120, out.get("까닭")
|