Files
Aislo/resources/tester/test_b06_patch_station.py
T
eomsangdonandClaude Opus 5.5 2da632dc45 refactor(B05·B06): 부름 0 옛 줄 · 늘 건너뛰는 시험 지움 (PLAN 472-8 ② ③ · 요구 409)
지움
- flushDesignStore(design_store · 부름 0) — 시험 344-4 의 flush 대조 한 줄도
- b_page_state 옛 세션 열쇠 옮김(legacy · migrate) · b_project_switch 옛 키 머리
  — 옛 열쇠는 세션 저장소(탭 닫으면 사라짐) · 지금 코드가 안 씀 · storage · DB 에 없음
  · 시험 290-1 · 401 · 384-1 의 옛 키 줄 뺌
- 시험만 부르던 TS — planFootprint(346-2 거울은 footprintRecord + slopePieces 로 그대로)
  · shiftSegment · shiftMovingPoints(쉬프트 단추는 09-02 지움 · min_cover_guard 쉬프트 시험 뺌)
  · dropStationsNear(test_b05_station_merge.mjs 지움) · createIrregularStationsSection(부름 0)
  · generalStations(234-1 은 기본 맞춤 값으로 같은 것 잼) · sameSummaryItem
- test_b05_b06_save_roundtrip + helper_b05_save_payload 둘 — 프로젝트 936be972 storage 없어 늘 skip
  · 같은 저장 왕복은 test_472_6_design_save(창구 원자성) · test_449_save_pipes(관 PUT)
    · test_238_1_save_keeps_structure_stations(구조물 측점)가 잼

남김
- migrateLegacyStations — 부르는 곳 있음(design_view_profile_sections) · storage 에 비정규 측점 남음
- common_util_excavation 셋 — 지금은 운영이 부름(design_calc_node)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 21:09:50 +09:00

42 lines
1.6 KiB
Python

"""횡단 저장 — 행 없는 측점의 수정을 버리지 않고 그 측점부터 세우는지(PLAN 19장).
옮긴 관 · 구조물 측점은 B05 확정 전이면 DB 행이 없다. 저장 · 확정이 그 자리 수정을 받으면
`ensure_structure_stations`([측점 만들기]와 같은 길)를 불러 측점을 세운 뒤 행을 만든다.
여기서는 부르는 조건만.
"""
import asyncio
import B06_Section.B06_Section_Router_Stations as stations
from B06_Section.B06_Section_Router_Confirm import _stand_patch_stations
PROJECT = "936be972-11bc-46c2-8bf3-b15d8de7df0d"
def _calls(monkeypatch, patches: list[float], known: list[float]) -> list[str]:
called: list[str] = []
async def fake(project_id):
called.append(str(project_id))
return 1
monkeypatch.setattr(stations, "ensure_structure_stations", fake)
asyncio.run(_stand_patch_stations(PROJECT))
return called
def test_행_없는_측점_수정이면_측점을_세움(monkeypatch):
assert _calls(monkeypatch, [120.0, 263.47], [120.0, 140.0]) == [PROJECT]
def test_모든_수정에_행이_있어도_맞춤은_부름(monkeypatch):
# 272 — 옮긴 관의 옛 측점 · 떠난 격자 자리 글을 지우려고 늘 부름(맞출 것이 없으면
# `ensure_structure_stations` 가 0 으로 그냥 돌아옴)
assert _calls(monkeypatch, [120.0, 140.004], [120.0, 140.0]) == [PROJECT]
assert _calls(monkeypatch, [], [120.0]) == [PROJECT]
def test_소수_측점_수정도_맞춤을_부름(monkeypatch):
assert _calls(monkeypatch, [119.8], [120.0]) == [PROJECT]
assert _calls(monkeypatch, [119.8], [119.8, 120.0]) == [PROJECT]