Merge branch 'sub_laptop_2' of C:/Aislo_wt/sub_laptop_2 into main_laptop_1
This commit is contained in:
@@ -18,6 +18,7 @@ from resources.tester.test_m02_labor_ref import COMPANY, world # noqa: F401 —
|
||||
|
||||
PCT = "GC001109" # 원/㎡ · 인력 둘 + 덧줄 %
|
||||
WAGE = "LB000001"
|
||||
PCT_WAGE = "LB000002" # 보통인부 — PCT 바탕 줄
|
||||
LIB = ("sangeun", "precombo", "labor")
|
||||
|
||||
|
||||
@@ -111,13 +112,6 @@ def test_same_and_no_reads_when_stamps_same(fresh, reads):
|
||||
assert company[0]["쓰는곳수"] == 1
|
||||
|
||||
|
||||
def _unfreeze(folder, key):
|
||||
"""옛 꼴(사본 뗌) — M01 을 지금 값으로 셈(사본 있으면 만든 때 값 그대로)."""
|
||||
doc = json.loads(layers.template_path(folder, "sangeun", key).read_bytes())
|
||||
old = {k: v for k, v in doc.items() if k not in ("사본", "수식", "M01판", "바탕판")}
|
||||
layers.write_template(folder, "sangeun", key, old)
|
||||
|
||||
|
||||
def test_edit_delete_add_and_dep_change(fresh, reads):
|
||||
up, a, b, sc = _shelf(fresh)
|
||||
mine = fresh["personal"]
|
||||
@@ -162,13 +156,12 @@ def test_m01_change_recounts_amount(fresh, tmp_path, monkeypatch):
|
||||
shutil.copytree(Path(m01.FOLDER) / "기계", copy / "기계") # 기계 = 폴더(826-2)
|
||||
monkeypatch.setattr(m01, "FOLDER", copy)
|
||||
mine = fresh["personal"]
|
||||
a = _sk(mine, "가", [_wage_line()])
|
||||
_unfreeze(mine, a)
|
||||
a = _sk(mine, "가") # 수식 사본 있는 SK — 개인 층 = M01 자동 따라옴(836-2)
|
||||
one = next(r for r in _same(mine) if r["이름"] == a)["기준금액"]
|
||||
assert one is not None
|
||||
wages = json.loads((copy / "인력.json").read_text(encoding="utf-8"))
|
||||
for row in wages["줄"]:
|
||||
if row.get("키") == WAGE:
|
||||
if row.get("키") == PCT_WAGE:
|
||||
row["값"] = float(row["값"]) * 2
|
||||
(copy / "인력.json").write_text(json.dumps(wages, ensure_ascii=False), encoding="utf-8")
|
||||
two = next(r for r in _same(mine) if r["이름"] == a)["기준금액"]
|
||||
|
||||
Reference in New Issue
Block a user