fix(m01): 값 빈 · 표에 없는 줄 시험을 그 줄만 비움 규칙에 맞춤 (test_masterdata_check)
- 범위규칙 마지막칸 — 101 은 멈춤 대신 그 줄이 비고 까닭「인 줄이 없음」 - 미공표 준용 — 값도 준용도 없는 직종은 그 줄이 비고 노무비 0 - 100 · 준용 값 확인은 그대로 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JgUhN55Z3BCYhUJTjwTNfj
This commit is contained in:
@@ -176,11 +176,11 @@ def test_범위규칙_이하_위끝만(whole):
|
||||
|
||||
|
||||
def test_범위규칙_마지막칸_이하_포함(whole):
|
||||
"""13-6-1 직경 「80㎝이상∼100㎝이하」 — 100 은 맞고 101 은 막힘."""
|
||||
"""13-6-1 직경 「80㎝이상∼100㎝이하」 — 100 은 맞고 101 은 표에 없는 줄이라 그 줄만 비고 까닭."""
|
||||
given = {"직경": 100, "지역": "전국평균", "보정작업": "해당 없음"}
|
||||
assert mf.run(whole, "GF000226", given)["줄"][0]["수량"] == Decimal("0.68")
|
||||
with pytest.raises(mf.FormulaError):
|
||||
mf.run(whole, "GF000226", {**given, "직경": 101})
|
||||
line = mf.run(whole, "GF000226", {**given, "직경": 101})["줄"][0]
|
||||
assert line["금액"] is None and line["단가"] is None and "인 줄이 없음" in line["까닭"]
|
||||
|
||||
|
||||
def test_굴착기_부착용_집게(whole):
|
||||
@@ -632,11 +632,11 @@ def test_미공표_준용():
|
||||
got = mf.run(mf.Master(files), "GX999999", {})
|
||||
assert got["줄"][0]["출처"] == "준용: 보통인부"
|
||||
assert got["노무비"] == 2 * Decimal(172068)
|
||||
lines[0]["요소"] = "LB:절단공" # 값도 준용도 없으면 멈춤 — 준용을 골라야 값이 섬
|
||||
lines[0]["요소"] = "LB:절단공" # 값도 준용도 없으면 그 줄이 빔 — 준용을 골라야 값이 섬
|
||||
alias = mf.Master(files).get("LB:절단공")
|
||||
alias["상태"], alias["값"], alias["준용"] = "미확보", None, None
|
||||
with pytest.raises(mf.FormulaError):
|
||||
mf.run(mf.Master(files), "GX999999", {})
|
||||
got = mf.run(mf.Master(files), "GX999999", {})
|
||||
assert got["줄"][0]["금액"] is None and got["줄"][0]["까닭"] and got["노무비"] == 0
|
||||
alias["준용"] = common
|
||||
assert mf.run(mf.Master(files), "GX999999", {})["줄"][0]["출처"] == "준용: 보통인부"
|
||||
lines[0]["요소"] = "LB:1003" # 옛 직종 갱부를 품은 현행 줄(특별인부) — 값 그대로
|
||||
|
||||
Reference in New Issue
Block a user