- [확정] 성공 길도 [저장]처럼 invalidateSectionDetail — 다음 페이지(B07)가 정본을 받음 - B06 폼 onPipeUpdate — 옮긴 뒤 옵션 · 캐시 얹기 · 집계 항목을 옮긴 자리(맞춘 정수 m)로 찾음(옛: 옛 자리로 찾아 옵션 잃음 · 비운 옛 자리 그림에 얹음) - 시험 test_466_pipe_move_options · test_272_detail_memory 확정 항목 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
1.7 KiB
Python
49 lines
1.7 KiB
Python
"""PLAN 466 덧(470 조사 4.2 N2) — B06 폼 관 고침: 0.51 m 넘게 옮기며 옵션도 고치면 옵션이 옮긴 관에 붙음.
|
|
|
|
못박는 것
|
|
- 옮김 + 옵션 = 관 초안(가게 pipes)의 옮긴 관에 새 옵션 · 캐시 얹기(`applyPipeOptions`)도 옮긴 자리.
|
|
- 0.51 m 안 옮김 · 옵션만 = 그 관에 새 옵션 · 얹기 = 지금 자리.
|
|
짝: `helper_466_pipe_move_options.cjs`(진짜 `createB06StructuresPanel` · 가짜 모듈 틀 = 165 헬퍼).
|
|
|
|
./venv/Scripts/python.exe -m pytest resources/tester/test_466_pipe_move_options.py -q
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
HERE = Path(__file__).resolve().parent
|
|
ROOT = HERE.parents[1]
|
|
|
|
pytestmark = pytest.mark.skipif(
|
|
not (ROOT / "config" / "node_modules" / "typescript").is_dir(),
|
|
reason="프론트엔드 의존성 미설치",
|
|
)
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def got() -> dict:
|
|
run = subprocess.run( # noqa: S603 — 고정 실행 파일
|
|
["node", str(HERE / "helper_466_pipe_move_options.cjs")],
|
|
capture_output=True,
|
|
text=True,
|
|
encoding="utf-8",
|
|
timeout=120,
|
|
)
|
|
assert run.returncode == 0, run.stderr
|
|
return json.loads(run.stdout)
|
|
|
|
|
|
def test_멀리_옮기며_옵션_고침(got) -> None:
|
|
assert got["far"]["pipes"] == [[100, 1200]] # 옛: [[100, 800]] — 옵션이 옛 자리로 찾아 안 붙음
|
|
assert got["far"]["applied"] == [[100, 1200]] # 옛: 80.17(비운 옛 자리 그림)
|
|
|
|
|
|
def test_가까이_옮김_옵션만(got) -> None:
|
|
assert got["near"]["pipes"] == [[80, 1000]] and got["near"]["applied"] == [[80, 1000]]
|
|
assert got["stay"]["pipes"] == [[80.17, 900]] and got["stay"]["applied"] == [[80.17, 900]]
|