From d8ab831e9b5ea7c2269a68395d1acd005a76316a Mon Sep 17 00:00:00 2001 From: umsangdon Date: Fri, 18 Sep 2026 02:53:44 +0900 Subject: [PATCH] =?UTF-8?q?fix(tester):=20=EC=9B=90=EB=AC=B8=20=EC=A4=84?= =?UTF-8?q?=20=EB=B2=88=ED=98=B8=EB=A5=BC=20=EB=AA=BB=EB=B0=95=EC=A7=80=20?= =?UTF-8?q?=EB=A7=90=EA=B3=A0=20=EA=B8=80=EC=9E=90=EB=A5=BC=20=EC=B0=BE?= =?UTF-8?q?=EA=B2=8C=20=C2=B7=20=EC=A0=9C=EA=B7=BC=20F0294=20=EB=8A=94=20?= =?UTF-8?q?=EC=A0=9C=20=EB=B0=91=EC=88=98=EB=A5=BC=20=EA=B0=96=EA=B2=8C=20?= =?UTF-8?q?=EB=90=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 원천 벌을 다시 뽑자 시험 셋이 빨강이 됐음. 셋 다 **줄 번호에 매달린 탓**이었음. - `test_b08_basis_unit` 둘 — 잇는 표가 적어 둔 근거 줄(L4704·L5930 …)이 md 손질로 밀렸음. 지키려던 것은 「그 단위가 **원문에 실제로 있나**」이지 「몇 번째 줄인가」가 아니므로 **글자를 찾는 쪽으로** 고침(±60줄 안 · 덤프 단위중량은 글 전체에서 찾음) - `test_b09_table_reading_2` — 9-21 제근은 「원문엔 밑수가 없다」가 전제였으나, 코덱스가 원문 「(단위: 100㎡당)」을 되살려 **제 밑수를 갖게 됨**. 전제를 고침(금액은 그대로 — 호표 값 시험 통과) ⬜ **브레인 판정 하나** — 제근 밑수가 갈림: 원문 **100㎡당** ↔ 사용자 확정 **1,000㎡당** (건설품셈 3-9-2 교차 참조로 메운 값). 교차 참조를 한 까닭이 「산림 원문에 밑수가 없어서」였고 이제 원문에 있으니 이 고리의 잣대(「원문이 정본」)로는 100㎡ 쪽이나, **열 배 갈리는 자리**이고 사용자 확정이라 스스로 뒤집지 않음. 시험에 ⬜ 로 적어 둠 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01QsGw1Dz9HmhuAxGisxmDPF --- resources/tester/test_b08_basis_unit.py | 16 +++++++++++++--- resources/tester/test_b09_table_reading_2.py | 4 +++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/resources/tester/test_b08_basis_unit.py b/resources/tester/test_b08_basis_unit.py index eae5496a..885897fb 100644 --- a/resources/tester/test_b08_basis_unit.py +++ b/resources/tester/test_b08_basis_unit.py @@ -232,6 +232,12 @@ DECLARED_SOURCE = { } +#: 적어 둔 줄에서 얼마까지 벗어난 것을 봐줄 것인가. +#: ⚠ **줄 번호를 못박지 않는다** — 원문 md 가 손질되면 줄이 밀린다(2026-09-18 실제로 밀렸다). +#: 지키려는 것은 「그 단위가 **원문에 실제로 있나**」이지 「몇 번째 줄인가」가 아니다. +SOURCE_LINE_SLACK = 60 + + def test_매핑이_적은_밑수가_원문_줄에_실제로_있다() -> None: if not PUM_TEXT.is_file(): return @@ -239,7 +245,10 @@ def test_매핑이_적은_밑수가_원문_줄에_실제로_있다() -> None: declared = MAPPING.declared_units() for code, (line_no, unit) in DECLARED_SOURCE.items(): assert declared.get(code) == unit, code - assert unit in lines[line_no - 1], f"{code} L{line_no}: {lines[line_no - 1][:60]}" + near = range( + max(0, line_no - 1 - SOURCE_LINE_SLACK), min(len(lines), line_no + SOURCE_LINE_SLACK) + ) + assert any(unit in lines[i] for i in near), f"{code} L{line_no} 주변에 「{unit}」이 없다" def test_품_단위는_밑수로_안_받는다() -> None: @@ -251,8 +260,9 @@ def test_덤프_단위중량이_원문_줄에_있다() -> None: """⚠ 「현장값이라 미확보」로 두었던 γt 가 원문에 있었다(2026-09-08 정정).""" if not PUM_TEXT.is_file(): return - line = PUM_TEXT.read_text(encoding="utf-8").splitlines()[5930 - 1] - assert "1.9ton/㎥" in line and "2.4ton/㎥" in line + # ⚠ 줄 번호로 집지 않는다 — 원문이 손질되면 밀린다(2026-09-18). 글자가 있는지만 본다. + text = PUM_TEXT.read_text(encoding="utf-8") + assert "1.9ton/㎥" in text and "2.4ton/㎥" in text # ── 공종 단위가 아닌 글자는 **안 받는다** (2026-09-08 B09 전수에서 나온 모양들) ──── diff --git a/resources/tester/test_b09_table_reading_2.py b/resources/tester/test_b09_table_reading_2.py index 399ee51d..cf3cfc54 100644 --- a/resources/tester/test_b09_table_reading_2.py +++ b/resources/tester/test_b09_table_reading_2.py @@ -152,7 +152,9 @@ def test_제근은_빌린_밑수가_확정이라_갈래가_서면_내역_금액 from B09_Estimation.B09_Estimation_BillOfQuantities import build_bill from B09_Estimation.B09_Estimation_UnitPrice import detail_of, load_basis_missing - assert "F0294" in load_basis_missing() + # 2026-09-18 원문이 되살아나 F0294 는 **제 밑수(100㎡당)를 갖는다** — 더는 미확보가 아니다. + # ⬜ 다만 사용자 확정은 교차 참조로 「1,000㎡당」이었다 — 열 배 갈리는 자리라 브레인 판정 대기. + assert "F0294" not in load_basis_missing() build = cached_build() assert "FP-09-21" not in build.basis_missing assert not [g for g in open_gaps(build) if g["code"] == "FP-09-21"]