Merge remote-tracking branch 'origin/sub_laptop_6' into sub_laptop_8
This commit is contained in:
@@ -334,7 +334,9 @@ def test_구조물_조합으로_규격_묶음_울진_돌기슭막이(client):
|
||||
if h["번"] in (17, 24, 25)
|
||||
}
|
||||
for no, c in ((17, "1.5"), (24, "2.0"), (25, "2.5")):
|
||||
assert abs(_total(doc, c) - excel[no]) <= excel[no] * 1e-4 # 열마다 = 그 호표 엑셀 합계(끝수 차)
|
||||
assert (
|
||||
abs(_total(doc, c) - excel[no]) <= excel[no] * 1e-4
|
||||
) # 열마다 = 그 호표 엑셀 합계(끝수 차)
|
||||
one = client.post("/api/m02/layers/personal/hopyo-item", json={**body, "묶음": []}).json()
|
||||
single, _ = _item_doc(one["열"])
|
||||
assert not single.get("규격") and one["이름"].endswith("H=1.5 L3=45cm")
|
||||
@@ -357,3 +359,28 @@ def test_규격_열_이름():
|
||||
assert item.columns(["H=1.5 L3=45cm", "H=2.0 L3=45cm"]) == ("H", ["1.5", "2.0"])
|
||||
assert item.columns(["일반형", "ㄷ형"]) == ("규격", ["일반형", "ㄷ형"])
|
||||
assert item.columns(["D800", "D1000"]) == ("D", ["800", "1000"])
|
||||
|
||||
|
||||
def test_줄만_첫_줄_수량_없음_별도계산은_줄():
|
||||
rows = _block(_rows("거창"), 2)[
|
||||
1:
|
||||
] # 「제2호표」 머리 줄 빼고 — 첫 줄 레미콘(별도계산 · 수량 없음)
|
||||
got = hp.read_text(
|
||||
_text(rows),
|
||||
{"품명": 1, "규격": 2, "수량": 3, "단위": 4, "금액": 6, "노": 7, "재": 9, "경": 11},
|
||||
)
|
||||
(one,) = got["호표"]
|
||||
assert one["번"] == 0 and one["이름"] == "붙여넣기" and one["줄"][0]["이름"] == "레미콘"
|
||||
assert len(one["줄"]) == 5
|
||||
|
||||
|
||||
def test_기억한_열_짝_한_칸_밀림_맞춤():
|
||||
stm = {"품명": 0, "규격": 1, "수량": 2, "단위": 3, "금액": 5, "노": 6, "재": 8, "경": 10}
|
||||
rows = _block(_rows("거창"), 2)[1:] # 엑셀꼴(앞 호표 칸) 줄만 — STmate 꼴로 기억한 짝
|
||||
got = hp.read_text(_text(rows), stm)
|
||||
assert got["열"]["품명"] == 1 and [x["이름"] for x in got["호표"][0]["줄"]][:2] == [
|
||||
"레미콘",
|
||||
"콘크리트공",
|
||||
]
|
||||
same = hp.read_text(_text(_block(_rows("대흥"), 17)), stm)
|
||||
assert same["열"] == stm
|
||||
|
||||
Reference in New Issue
Block a user