Merge remote-tracking branch 'origin/sub_laptop_4' into sub_laptop_2

This commit is contained in:
2026-10-30 22:05:04 +09:00
2 changed files with 36 additions and 3 deletions
+3 -1
View File
@@ -24,7 +24,7 @@ A, B, C = (230000.0, 450000.0), (231500.0, 451200.0), (238000.0, 455000.0)
@pytest.fixture
def fake(tmp_path, monkeypatch):
seen = {"download": [], "merge": [], "satellite": [], "dem": []}
seen = {"download": [], "merge": [], "satellite": [], "dem": [], "warm": []}
def download_sheet(store_dir, sheet_no, version=2):
seen["download"].append(sheet_no)
@@ -63,6 +63,7 @@ def fake(tmp_path, monkeypatch):
monkeypatch.setattr(terrain, "parse_and_merge_sheets", merge)
monkeypatch.setattr(terrain, "download_vworld_satellite_map", satellite)
monkeypatch.setattr(terrain, "load_terrain", load_terrain)
monkeypatch.setattr(terrain, "_warm_store", lambda *a: seen["warm"].append(a[0]) or [])
return tmp_path, seen
@@ -91,6 +92,7 @@ def test_one_set_and_extend_keeps_old(fake) -> None:
m = terrain.DEFAULT_MARGIN_M
box = [min(A[0], B[0]) - m, min(A[1], B[1]) - m, max(A[0], B[0]) + m, max(A[1], B[1]) + m]
assert _dem_box(seen) == pytest.approx(box) == first["box_m"]
assert seen["warm"][-1] == pytest.approx(box) # 새 도엽 함께 셈 = 같은 상자
assert terrain.received_box(root) == pytest.approx(tuple(box))
# 작업 좌표계 .prj — B 좌표계 창구가 읽음
assert resolve_project_crs(root) == f"EPSG:{EPSG}"