Files
Aislo/resources/tester/test_387_8_folded_profile.py
T
eomsangdonandClaude Opus 5.5 89728f83fb fix(387-8): 낡음 판정 = 상세 가게 몫 — 접힌 종단 판 · 관 초안 다시 열기 = 펼친 때 값
- 상세를 읽은 뒤 묶음 차례가 끝나면 화면 선 대비 낡음을 보고 cross 한 번 더(미리 뜬 측점이 cross 뒤에 얹힘)
- 같은 낡음은 한 번만 · 묶음이 안 섬 · 노선 초안 = 안 부탁 · 기다림 = settled(맞춤 안 부름)
- 새 시험 test_387_8_folded_profile

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014utrjfoW831Vc5wJUd13kL
2026-10-17 19:52:30 +09:00

56 lines
2.5 KiB
Python

"""387-8 종단 판이 접혀도(그리기 낡음 판정 없음) 관 초안 둔 채 다시 열기 = 펼친 때 값 — 미리 뜬 측점 안 섞임.
· 관 초안 자리 미리 뜬 횡단(서버가 저장 계획선 = 옛 계획고로 셈)이 묶음 cross 뒤에 얹히면 상세 가게가 묶음이 다 돈 뒤
화면 선 기준 낡음을 보고 cross 한 번 더(낡음 판정 = 가게 몫 · 원칙 4 — 보기가 숨어도 계산 · 판정은 돎)
· 같은 낡음 = 한 번만 · 묶음이 아직 안 섬 · 노선 초안 = 안 부탁
./venv/Scripts/python.exe -m pytest resources/tester/test_387_8_folded_profile.py -q
"""
from __future__ import annotations
import json
import subprocess
from pathlib import Path
import pytest
ROOT = Path(__file__).resolve().parents[2]
HELPER = Path(__file__).parent / "helper_387_8_folded_profile.cjs"
@pytest.fixture(scope="module")
def out() -> dict:
done = subprocess.run( # noqa: S603 — 고정 실행 파일
["node", str(HELPER)], cwd=str(ROOT), capture_output=True, text=True, encoding="utf-8"
)
assert done.returncode == 0, done.stderr
return json.loads(done.stdout)
def test_접힌_종단_판_다시_열기_펼친_때와_같음(out: dict) -> None:
assert out["folded"]["mixed"] == [] and out["expanded"]["mixed"] == []
assert out["folded"]["sum"] == out["expanded"]["sum"]
assert (out["folded"]["crosses"], out["folded"]["forced"]) == (1, 1)
def test_되풀이_없음(out: dict) -> None:
assert out["again"] == {"crosses": 1, "forced": 1} # 다시 읽어도 더 안 부탁
assert out["unfixed"] == {"crosses": 1, "forced": 1} # 못 고친 낡음 = 한 번만
@pytest.mark.parametrize("case", ["notStarted", "routeDraft", "noDraft"])
def test_안_부탁(out: dict, case: str) -> None:
assert (out[case]["crosses"], out[case]["forced"]) == (0, 0)
def test_부르는_곳() -> None:
store = (ROOT / "B06_Section/B06_Section_Section_Store.ts").read_text(encoding="utf-8")
walls = store.split("async function withDraftWalls", 1)[1].split("\n}\n", 1)[0]
assert "recrossSaved(projectId, keyOf(projectId, routeId), detail, routeId);" in walls
body = store.split("function recrossSaved", 1)[1].split("\n}\n", 1)[0]
assert "staleKeyAgainstScreen(detail, staleOf)" in body and "askedStale" in body
# 종단 판 그리기는 기다림 표시만(다시 셈 부탁 없음 · 387-4)
preview = (ROOT / "B05_Profile/B05_Profile_UI_Profile_Preview.ts").read_text(encoding="utf-8")
assert "forceCross" not in preview