- D03_Api 겹 받기 → map_layer_api.ts(D03_Api 가 다시 내놓음) - UI_SlopeBands · logic SlopeBands · UI_SatLight → map_slope_bands · logic/map_slope_bands · map_sat_light - 범례 줄 legendRows → map_legend.ts(받은 자료 꼴 LegendData · D03 LayerLegend 가 다시 내놓음) - glImage · glTagged · shadeImage · loadImage · WATER_KEYS · FOREST_ROAD_KINDS · hectare → map_layer_data.ts - 시험 경로 고침 — test_603(TS 자리) · test_606_1(밝기 파일) · test_584_3(범례 글 = 공용 파일도 읽음) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.5 KiB
Python
41 lines
1.5 KiB
Python
"""606-1 위성 바탕 밝기 지킴 — D03 위성 칠에 밝기 상한 · 채도 · 사용자 조절 칸 · 갈래 굵기 3 (B04 · B05 위성은 그대로).
|
|
|
|
./venv/Scripts/python.exe -m pytest resources/tester/test_606_1_sat_light.py -q
|
|
"""
|
|
|
|
import re
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
read = lambda rel: (ROOT / rel).read_text(encoding="utf-8") # noqa: E731
|
|
|
|
MAPGL = read("A00_Common/map/map_layer_specs.ts") # 624-2 GL 겹 꼴 = 공용
|
|
LIGHT = read("A00_Common/map/map_sat_light.ts") # 624-3 공용
|
|
LAYERS = read("D03_PlanAnalysis/D03_PlanAnalysis_UI_Layers.ts")
|
|
|
|
|
|
def test_위성_칠에_밝기_채도():
|
|
assert re.search(r'raster\("satellite", 1, \{[^}]*"raster-brightness-max": light', MAPGL)
|
|
assert '"raster-saturation": SAT_SATURATION' in MAPGL
|
|
|
|
|
|
def test_밝기_처음값은_어둡게_범위_안():
|
|
m = {k: float(v) for k, v in re.findall(r"SAT_LIGHT_(MIN|MAX|DEFAULT) = ([\d.]+)", LIGHT)}
|
|
assert m["MIN"] < m["DEFAULT"] < m["MAX"] == 1
|
|
|
|
|
|
def test_조절_칸은_GL_위성_켠_때만_기억():
|
|
assert "createSatLightRow(" in LAYERS
|
|
assert "glOn && on.satellite" in LAYERS
|
|
assert "aislo:pref:d03.satellite-light" in LIGHT
|
|
|
|
|
|
def test_갈래_굵기_3():
|
|
paint = read("D03_PlanAnalysis/D03_PlanAnalysis_UI_DrawPaint.ts")
|
|
assert "const width = 3;" in paint
|
|
assert "branch ? 2.5" not in paint
|
|
|
|
|
|
def test_공용_GL_바탕은_안_바뀜():
|
|
assert "brightness" not in read("ui_template/ui_template_gl_map.ts")
|