- 433-4 갈아끼움이 curveMoves 거꾸로 맵으로 옛 MC 횡단을 이어 받음 — 설계 · 측점 id · moves 짝 남음 - 433-11 자리 · 축 같은 앞 단면은 지반 표본 · 상단측 · 중심고 그대로 — 덧 측점 넣기 · 빼기 뒤 누가토량 = 서버 - 433-19 Span_Control.update(culvertopt 큐) 걷음 — 구간 줄은 다단 벽만 - 433-20 표 위 CAD 요소 2000 넘음 = 초안에 안 씀 · 알림(서버 max_length 짝) - 시험 test_433_4 · test_433_11 · test_433_19_20 새로 · 346_2 단언 · 440 헬퍼 로더 맞춤 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
46 lines
1.7 KiB
Python
46 lines
1.7 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""433-19 · 433-20 — 구간값 죽은 길 걷음 · 표 위 CAD 요소 한도(서버 2000 짝).
|
|
|
|
못박는 것
|
|
- 구간값 제어에 기준벽 `update`(culvertopt 큐 쓰기) 없음 · 구간 줄은 다단 벽만(444 관 초안 한 벌).
|
|
- 표 위 CAD 한도 = 서버 `CrossNoteCad.entities max_length` · 넘으면 초안에 안 쓰고 알림.
|
|
"""
|
|
|
|
import re
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
B06 = ROOT / "B06_Section"
|
|
|
|
|
|
def _read(name: str) -> str:
|
|
return (B06 / name).read_text(encoding="utf-8")
|
|
|
|
|
|
def test_구간값_제어에_culvertopt_큐_쓰기_없음():
|
|
span = _read("B06_Section_UI_Page_Span_Control.ts")
|
|
assert "culvertOptions" not in span
|
|
assert "update: (section, role" not in span
|
|
wire = _read("B06_Section_UI_Cross_Culvert_Wire.ts")
|
|
assert not re.search(r"^\s*update: \(section: CrossSection, role", wire, re.M)
|
|
view = _read("B06_Section_UI_Cross_View_Structure.ts")
|
|
assert "structureSpan?.update(" not in view
|
|
|
|
|
|
def test_CAD_한도_서버와_같음():
|
|
schema = _read("B06_Section_Schema.py")
|
|
server = re.search(
|
|
r"class CrossNoteCad\(BaseModel\):.*?entities:.*?max_length=(\d+)", schema, re.S
|
|
)
|
|
cad = _read("B06_Section_UI_Cross_Detail_Cad.ts")
|
|
screen = re.search(r"NOTE_CAD_MAX_ENTITIES = (\d+)", cad)
|
|
assert server and screen and server.group(1) == screen.group(1)
|
|
|
|
|
|
def test_CAD_한도_넘으면_초안에_안_씀():
|
|
cad = _read("B06_Section_UI_Cross_Detail_Cad.ts")
|
|
body = cad[cad.index("function writeNoteCad(") :]
|
|
guard = body.index("NOTE_CAD_MAX_ENTITIES")
|
|
assert guard < body.index("structure_note_cad = cad")
|
|
assert "showToast(" in body[guard : body.index("structure_note_cad = cad")]
|