test(계산등록부): 거울 시험 참조 정리
- 삭제된 화면 시험 참조 10건을 기존 지킴 시험으로 정리 - 노드 편집 TS·파이썬 합성 거울 대조 보강
This commit is contained in:
@@ -64,7 +64,7 @@ export const CALC_REGISTRY: readonly CalcEntry[] = [
|
||||
ts: `${B05L}B05_Profile_UI_RouteEdit_Curve.ts#buildEditedPolyline`,
|
||||
runner: "node:route.polyline",
|
||||
pair: `${U}common_util_route_polyline.py#build_planned_polyline`,
|
||||
mirror: ["test_route_polyline_browser_mirror", "test_511_b5_route_node"],
|
||||
mirror: ["test_route_polyline_browser_mirror"],
|
||||
note: "서버 노선 저장(편집 갈래 · `_write_planned_polyline`) = Node · 파이썬 짝은 첫 폴리라인(단순화) · 추천 엔진 · B04 배수 · 노선 열기가 부름 — 짝 남음 · 알려진 차 = 교각 딱 5° 배수면 원호 점 ±1(libm 끝자리 · 실데이터 0 차)",
|
||||
},
|
||||
{
|
||||
@@ -91,7 +91,7 @@ export const CALC_REGISTRY: readonly CalcEntry[] = [
|
||||
ts: `${B05L}B05_Profile_UI_RouteEdit_Edits.ts#applyCurveLimits`,
|
||||
runner: "node:route.polyline",
|
||||
pair: `${B05}B05_Profile_Route_NodeEdits.py#node_edits`,
|
||||
mirror: ["test_430_route_edit_rules", "test_511_b5_route_node"],
|
||||
mirror: ["test_430_route_edit_rules"],
|
||||
note: "곡선표 편집표 = Node `route.polyline` 의 `nodeEdits` · 파이썬 짝 = Node 못 돌릴 때",
|
||||
},
|
||||
{
|
||||
@@ -120,11 +120,7 @@ export const CALC_REGISTRY: readonly CalcEntry[] = [
|
||||
ts: `${B05L}B05_Profile_UI_RouteEdit_Frame.ts#stationFrameAt`,
|
||||
runner: "node:stations.list",
|
||||
pair: `${B05}B05_Profile_Engine_Sections_Core.py#generate_sections`,
|
||||
mirror: [
|
||||
"test_b05_routeedit_frame_mirror",
|
||||
"test_224_2_station_snap",
|
||||
"test_511_b2_stations_node",
|
||||
],
|
||||
mirror: ["test_b05_routeedit_frame_mirror", "test_224_2_station_snap"],
|
||||
note: "서버 측점 생성 = Node `stations.sections`(DTM) · 파이썬 짝 = DTM 아닌 지표면 · 추천 엔진 · B06 측점 맞춤",
|
||||
},
|
||||
{
|
||||
@@ -146,11 +142,7 @@ export const CALC_REGISTRY: readonly CalcEntry[] = [
|
||||
ts: `${B05L}B05_Profile_Sections_Stations.ts#buildStations`,
|
||||
runner: "node:stations.list",
|
||||
pair: `${B05}B05_Profile_Engine_Sections_Core.py#generate_sections`,
|
||||
mirror: [
|
||||
"test_344_3_pipeline_stations_mirror",
|
||||
"test_407_curve_station",
|
||||
"test_511_b2_stations_node",
|
||||
],
|
||||
mirror: ["test_344_3_pipeline_stations_mirror", "test_407_curve_station"],
|
||||
note: "서버 측점 생성 길(B03 체인 · 노선 저장 · 재생성 · 추천 초기 종단) = Node `stations.sections`(DTM) · 파이썬 짝 = DTM 아닌 지표면 · B07 IP 표 · 추천 엔진",
|
||||
},
|
||||
{
|
||||
@@ -164,7 +156,7 @@ export const CALC_REGISTRY: readonly CalcEntry[] = [
|
||||
ts: `${U}common_util_station_key.ts#stationKey`,
|
||||
runner: "node:stations.list",
|
||||
pair: `${U}common_util_station_key.py#station_key`,
|
||||
mirror: ["test_344_3_station_key_mirror", "test_511_b2_stations_node"],
|
||||
mirror: ["test_344_3_station_key_mirror"],
|
||||
note: "노선 저장 이월 열쇠 = Node 측점 출력(`key` · 옛 노선 = `stations.list`) · 파이썬 짝 = 옛 열쇠 꼴 읽기(at: · 누가거리)",
|
||||
},
|
||||
{
|
||||
@@ -207,7 +199,7 @@ export const CALC_REGISTRY: readonly CalcEntry[] = [
|
||||
ts: `${U}common_util_surface_sampler.ts#heightAt`,
|
||||
runner: `py:${U}common_util_surface_sampler.py#build_surface_sampler`,
|
||||
pair: `${U}common_util_surface_sampler.py#build_surface_sampler`,
|
||||
mirror: ["test_344_1_surface_sampler_mirror", "test_511_b2_stations_node"],
|
||||
mirror: ["test_344_1_surface_sampler_mirror"],
|
||||
note: "서버 측점 생성(DTM) = Node `stations.sections` 격자 표본 · 파이썬 표본기 남김 = DTM 아닌 지표면 · 조작 중 「서버」 표본 창구 · B04 · B07 · 추천 · X2 = 브라우저 격자 .bin · 서버 npz(값 협의)",
|
||||
},
|
||||
{
|
||||
@@ -249,7 +241,7 @@ export const CALC_REGISTRY: readonly CalcEntry[] = [
|
||||
ts: `${B05L}B05_Profile_Pipeline_Detail.ts#uphillSide`,
|
||||
runner: "node:stations.sections",
|
||||
pair: `${B05}B05_Profile_Engine_Sections_Core.py#generate_sections`,
|
||||
mirror: ["test_346_2_pipeline_cross_page", "test_511_b2_stations_node"],
|
||||
mirror: ["test_346_2_pipeline_cross_page"],
|
||||
note: "서버 측점 생성(DTM) = Node `stations.sections` 의 상단측 · DTM 아닌 지표면 = 파이썬 짝",
|
||||
},
|
||||
/* ── 종단 ─────────────────────────────────────────────────────────────── */
|
||||
|
||||
@@ -30,7 +30,6 @@ export const FACILITY_ROWS: readonly CalcEntry[] = [
|
||||
"test_459_route_seat_mirror",
|
||||
"test_380_3_site_follow",
|
||||
"test_472_4_follow_node",
|
||||
"test_511_b5_route_node",
|
||||
],
|
||||
note: "파이썬 `common_util_route_follow.follow_structures` = Node 부름 겉 · 저장 때 좌표 맞춤 `fill_structure_coordinates` = 같은 Node 입구 + fill(`fillStructureCoordinates` · 옛 좌표 지킴 · 0.1 mm · `placeOnLine` 노선 위 자리와 한 벌 · 511-B B-5)",
|
||||
},
|
||||
@@ -59,7 +58,7 @@ export const FACILITY_ROWS: readonly CalcEntry[] = [
|
||||
ts: `${U}common_util_route_follow.ts#rebasePipeDraft`,
|
||||
runner: "node:facility.rebase",
|
||||
pair: null,
|
||||
mirror: ["test_472_6_route_save", "test_349_0u_save_rebase", "test_459_route_seat_mirror"],
|
||||
mirror: ["test_472_6_route_save", "test_459_route_seat_mirror"],
|
||||
note: "구조물 = 같은 파일 `rebaseStructureDraft` · 서버 [저장] 한 본문(`B06_Section_Router_DesignSave_Route`)이 부름",
|
||||
},
|
||||
{
|
||||
@@ -73,7 +72,7 @@ export const FACILITY_ROWS: readonly CalcEntry[] = [
|
||||
ts: `${U}common_util_structure_station.ts#planStations`,
|
||||
runner: "node:stations.plan",
|
||||
pair: `${U}common_util_structure_station.py#plan_stations`,
|
||||
mirror: ["test_322_3_plan_mirror", "test_234_1_structure_station", "test_511_b5_route_node"],
|
||||
mirror: ["test_322_3_plan_mirror", "test_234_1_structure_station"],
|
||||
note: "서버 측점 생성 = Node `stations.sections` · 남은 부름(이월 열쇠 주인 · 옛 측점 옮기기) = Node `stations.plan` · 파이썬 짝은 B06 형상 얹기 · B07 · 배수 · Node 못 돌릴 때",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -115,6 +115,7 @@ out.noteInput = nudge.fitNote(ROUTE, after, 2, [], 20, 20);
|
||||
// 짝 — 서버 곡선표(파이썬이 씀)를 그대로 펴서 넣은 값이 돌아오는가
|
||||
const server = JSON.parse(fs.readFileSync(process.argv[2], "utf8"));
|
||||
const flat = edits.flattenServerPlan(server.nodes, server.curves, server.edits);
|
||||
out.nodeEdits = edits.nodeEdits(...server.editInput);
|
||||
out.flat = {
|
||||
planned: flat.planned,
|
||||
curveOn: flat.curveOn,
|
||||
|
||||
@@ -50,18 +50,21 @@ def saved(tmp_path_factory) -> dict:
|
||||
with replan._nodes_path(path).open(encoding="utf-8") as handle:
|
||||
nodes = [(float(row["x"]), float(row["y"])) for row in csv.DictReader(handle)]
|
||||
outline = build_planned_polyline(nodes, min_radius_m=30.0, simplify=False)
|
||||
edit_input = [NODES, FLAGS, RADII, LOCKS, ARCS]
|
||||
return {
|
||||
"path": path,
|
||||
"nodes": [node.as_dict() for node in outline.nodes],
|
||||
"curves": replan._read_curves(path),
|
||||
"edits": replan._read_curves(path, "edits"),
|
||||
"editInput": edit_input,
|
||||
"nodeEdits": node_edits(*edit_input),
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def got(saved, tmp_path_factory) -> dict:
|
||||
server = tmp_path_factory.mktemp("server") / "plan.json"
|
||||
payload = {key: saved[key] for key in ("nodes", "curves", "edits")}
|
||||
payload = {key: saved[key] for key in ("nodes", "curves", "edits", "editInput")}
|
||||
server.write_text(json.dumps(payload), encoding="utf-8")
|
||||
run = subprocess.run( # noqa: S603 — 고정 실행 파일
|
||||
["node", str(HELPER), str(server)],
|
||||
@@ -136,6 +139,10 @@ def test_node_edits_짧은_칸은_기본값() -> None:
|
||||
assert edits[2] == {"curve": True, "radius_m": None, "lock": None, "arc_m": None}
|
||||
|
||||
|
||||
def test_node_edits_TS_파이썬_같음(got, saved) -> None:
|
||||
assert got["nodeEdits"] == saved["nodeEdits"]
|
||||
|
||||
|
||||
def test_편집값_없이_쓴_곡선표는_edits_없음(tmp_path) -> None:
|
||||
path = tmp_path / "planned_route.csv"
|
||||
replan._write_planned_polyline(path, NODES, 30.0, simplify=False)
|
||||
|
||||
Reference in New Issue
Block a user