Merge remote-tracking branch 'origin/sub_laptop_1' into sub_laptop_7
This commit is contained in:
@@ -83,7 +83,7 @@ def test_copy_stamped_logic_change_kept(world, monkeypatch):
|
||||
sc = _sc(me, [{"로직": PCT, "수량": {"손": 1}}])
|
||||
doc = _labor(me, [{"로직": PCT, "수량": {"손": 2}}])
|
||||
for got in (doc, _read(me, "precombo", sc)):
|
||||
assert PCT in {r["키"] for r in skc.held(got)["로직"]}
|
||||
assert PCT in got["수식"]["부름"] # 로직 몫 = 수식 부름 문서(값 사본 로직 줄 없음 · 855-E 2-E4)
|
||||
assert LB in {r["키"] for r in skc.held(got)["단가"]}
|
||||
was = (_calc(me, COL)["반영합"]["계"], _calc(me, sc)["기준합"]["계"], _unit(me, sc))
|
||||
assert _calc(me, COL)["사본"]["M01새판"] is False
|
||||
@@ -115,7 +115,7 @@ def test_layer_and_column_copy_keep_copy(world, monkeypatch):
|
||||
co, me = world["company"], world["personal"]
|
||||
src = _sc(co, [{"로직": PCT, "수량": {"손": 1}, "패치": COVER}])
|
||||
first = skc.held(_read(co, "precombo", src))
|
||||
old = skc.held(_labor(me, [{"로직": PCT, "수량": {"손": 2}}])) # 받는 열 = 옛 M01 사본
|
||||
old_doc = _labor(me, [{"로직": PCT, "수량": {"손": 2}}]) # 받는 열 = 옛 M01 사본
|
||||
_fake(monkeypatch, [_double(LB), _changed(_live().logic(PCT))])
|
||||
ref = {"층": "company", "주인": "7", "키": src}
|
||||
with store.at(me):
|
||||
@@ -125,8 +125,9 @@ def test_layer_and_column_copy_keep_copy(world, monkeypatch):
|
||||
mine = skc.held(_read(me, "precombo", got["이름"]))
|
||||
assert (mine["판"], mine["단가판"]) == (first["판"], first["단가판"])
|
||||
_write(me, "labor", "sub2임시2", {"열": "sub2임시2", "담은로직": [{"로직": PCT}], "자재": []})
|
||||
other = skc.held(_read(me, "labor", "sub2임시2")) # 원본 열 = 바뀐 M01 사본
|
||||
assert other["판"] != old["판"]
|
||||
other_doc = _read(me, "labor", "sub2임시2") # 원본 열 = 바뀐 M01 사본
|
||||
other = skc.held(other_doc)
|
||||
assert other_doc["수식"]["부름"][PCT] != old_doc["수식"]["부름"][PCT] # 바뀐 M01 문서
|
||||
with store.at(me): # 열 복사(copy_from) = 받은 사본 먼저
|
||||
store.copy_from("labor", COL, "sub2임시2")
|
||||
assert skc.held(_read(me, "labor", COL))["판"] == other["판"]
|
||||
|
||||
@@ -42,17 +42,5 @@ def test_imported_old_equation_edit_refused(world):
|
||||
doc = _doc(me, key)
|
||||
assert "로직" not in doc["가져온"] and doc["가져온"]["문서"]["금액"]
|
||||
edit = [{"할일": "식", "자리": "호표:0", "식": "0.5 × 2"}]
|
||||
with pytest.raises(Exception, match="수식 고침 못 얹음"):
|
||||
with pytest.raises(Exception, match="수식고침"): # 옛 칸 = 받지 않음(855-E 2-E4)
|
||||
_save(me, key, {**doc, eqm.KEY: edit})
|
||||
|
||||
|
||||
def test_screen_same_part_first_tab():
|
||||
"""화면 — M02 수식 = 공용 수식 문서 화면(802-4b-2 · 옛 수식 나무 화면 걷음) · 첫 탭 · 옛 탭 걷음(799-2)."""
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
root = Path(__file__).resolve().parents[2] / "M02_MasterTemplete"
|
||||
assert not (root / "M02_MasterTemplete_Sangeun_Equation.ts").exists()
|
||||
tabs = (root / "M02_MasterTemplete_Sangeun_Tabs.ts").read_text(encoding="utf-8")
|
||||
# 799-2 · 836-3 — 시트 · 인력·재료·경비 · 시험 계산 · 텍스트 수식 · 보기 고르기(단가산출 상세 탭) 걷음
|
||||
assert not re.findall(r'\{ value: "(\w+)", label: ', tabs) and "createSegment" not in tabs
|
||||
|
||||
Reference in New Issue
Block a user