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"]