test(M02): 집계표 시험 넷 낡은 견본 · 기대값 맞춤(87-2)

- 자동 맞춤 견본 = 옵션 그룹 · 컨테이너 복사 건(복사본 …__그룹) 빼고 본체만 — 지정 항목 모드 몫이라 자동 맞춤에서 두 번 셈(46-3 · 54-6)
- 관 유출 흙막이 열 id 「rv|돌쌓기(찰)|1.5」(기본 높이 54-36) · 세월교 열 「fb|1000|2」(련수 기본 2 · 65-1)
- 템플릿 층 채운 표 알림 = 배관 한 개 컨테이너 셋 → 미지정 4건

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BVPp2o6Mh2FZJr72yW3ofZ
This commit is contained in:
2026-10-08 13:12:10 +09:00
co-authored by Claude Sonnet 5.5
parent 798b2b1a63
commit 2878b7c0de
2 changed files with 11 additions and 7 deletions
+9 -6
View File
@@ -72,7 +72,9 @@ def project(tmp_path: Path) -> Path:
def _auto(project: Path, document: dict[str, Any], lengths: dict[float, float]) -> dict[str, Any]:
"""바인딩 자동 맞춤(`fill_document` 기본) — 프로젝트 `fill_table` 은 지정 항목 모드(PLAN 21-3)라
펼침 · 묶음 · 손 값 규칙은 이 길로 봄."""
return fill.fill_document(document, fill.collect_items(project, lengths))
# 옵션 그룹 · 컨테이너마다 더 서는 건(복사본 `…__그룹`)은 지정 항목 모드 몫 — 자동 맞춤은 본체만 셈
items = [i for i in fill.collect_items(project, lengths) if "__" not in i["복사본"]]
return fill.fill_document(document, items)
def _filled(project: Path, document: dict[str, Any] | None = None) -> dict[str, Any]:
@@ -94,10 +96,11 @@ def test_펼침_열은_설계에_쓰인_값만_차례대로(project: Path) -> No
]
assert not any(i.startswith("rw|") for i in ids) # 옹벽 없음 → 열 없음
assert "rv" not in ids and "ps" in ids # 펼침 마스터 칸은 빠지고 고정 열은 남음
# 관 유입·유출 기슭막이는 레지스트리 기본값(찰 · 메 · 높이 없음)으로 열이 섬 · id 는 설계 값
assert "rv|돌쌓기(찰)|-" in ids and "rv|돌쌓기(메)|-" in ids
assert _col(doc, "rv|돌쌓기(찰)|-")["머리"] == ["돌기슭막이", "찰쌓기", "높이 미입력"]
assert _col(doc, "fb|1000|-")["머리"] == ["세월교", "Φ1000×련수 미입력", None]
# 관 유출 기슭막이는 레지스트리 기본값(찰 · 흙막이 기본 높이 1.5 — 54-36)으로 열이 섬 · id 는 설계 값
assert [i for i in ids if i.startswith("rv|")] == ["rv|돌쌓기(찰)|1.5"]
assert _col(doc, "rv|돌쌓기(찰)|1.5")["머리"] == ["돌기슭막이", "찰쌓기", "H=1.5"]
# 세월교 기본값(65-1) — 련수 칸 기본 2
assert _col(doc, "fb|1000|2")["머리"] == ["세월교", "Φ1000×2련", None]
assert not any(i.startswith("pg_in|") for i in ids) # 날개벽·집수정 형식 없음 → 관보호공 없음
@@ -151,7 +154,7 @@ def test_측점_줄_같은_측점은_한_줄_관은_나눔(project: Path) -> Non
assert first["sta"] == second["sta"] == "NO.4+5.05"
assert first["pp_len|파형강관|1000"] == 14.0 and "pp_len|흄관|1000" not in first
assert second["pp_len|흄관|1000"] == 14.0 # 한 측점 횡단 관 연장은 하나 — 두 관이 같이 씀
assert first["rv|돌쌓기(찰)|-"] == second["rv|돌쌓기(찰)|-"] == 10
assert first["rv|돌쌓기(찰)|1.5"] == second["rv|돌쌓기(찰)|1.5"] == 10
assert rows["s300.00"]["값"]["ps"] == 1
assert [row["값"].get("no") for row in doc["줄"][1:]] == [str(i) for i in range(1, 8)]
assert "식" not in rows["s200.00~230.00"] # 줄눈 간격이 달라도 열 식이 없으면 줄 식 없음
+2 -1
View File
@@ -242,8 +242,9 @@ def test_채운_표는_작업본을_채워_돌려주고_저장_안_함(
before = layers.version_of(root / "templates/table/구조물집계표.json")
got = world["client"].get(f"/api/m02/projects/{P1}/tables/구조물집계표/filled").json()
# 프로젝트 채움 = 지정 항목 모드(PLAN 21-3) — 집계 항목 미지정 관은 표에 안 들어감
# 배관 한 개 = 관 · 보호공(유입) · 보호공(유출) 컨테이너 셋(54-1) → 미지정 4건
assert not any(r["id"] == "s40.00" for r in got["문서"]["줄"])
assert "집계 항목 미지정 1건 — 표에 안 들어감" in got["문서"]["알림"]
assert "집계 항목 미지정 4건 — 표에 안 들어감" in got["문서"]["알림"]
assert got["결과"] == {"계산": {}} and got["판"] == before
assert layers.version_of(root / "templates/table/구조물집계표.json") == before