# ruff: noqa: F811 — 임시 층 fixture(world)를 test_m02_labor_ref 에서 받아 씀 """855 2-D — 굳은 사본 표지 `수식.굳힘`(사본을 만들 때 적음 · 사용자 원칙: 프로젝트는 M02 것을 복사해 가져가 [재생성] · [단가 갱신] 전까지 그대로). 임시 storage · 개인 층 단가산출(바탕 PCT · 노임 LB000036). M01 노임을 두 배로 바꾸면: 표지 없는 층 단가산출 = 따라옴(836-2) · 표지 있는 같은 문서 = 실린 값 · 문서 그대로 셈. """ from __future__ import annotations import copy from decimal import Decimal from M01_MasterData import M01_MasterData_Store as m01 from M02_MasterTemplete import M02_MasterTemplete_Store as store from M02_MasterTemplete import M02_Sangeun_Calc as calc from M02_MasterTemplete import M02_Sk_AutoRenew as renew from resources.tester.test_795_1_sk_copy import _doc, _fake, _sk from resources.tester.test_795_2_sc_copy import LB, PCT, _double from resources.tester.test_m02_labor_ref import world # noqa: F401 — 같은 임시 층 def _sum(folder, doc) -> Decimal: with store.at(folder): return Decimal(str(calc.run(doc, m01.loaded()[1])["기준"]["계"])) def test_굳힘_표지면_M01_바뀌어도_그대로_없으면_따라옴(world, monkeypatch): me = world["personal"] live = _doc(me, _sk(me, 바탕={"로직": PCT})) held = copy.deepcopy(live) held["수식"][renew.FROZEN] = True was = _sum(me, live) assert _sum(me, held) == was > 0 _fake(monkeypatch, [_double(LB)]) # M01 노임 두 배 assert _sum(me, live) > was # 층 서고 = 지금 M01 따라옴 assert _sum(me, held) == was # 굳은 사본 = 실린 값 그대로