修复 Autocal 压头配置、姿态保存与复核性能
阻止不完整标定配置生成 Z 目标,同步当前测点姿态,并将复核文件校验移到后台。通过 476 项全量测试、53 项最终定向复验和代码检查。
This commit is contained in:
@@ -15,10 +15,23 @@ from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
APP_ROOT = Path(__file__).resolve().parents[1]
|
||||
INSTALLED = APP_ROOT / "preference.json"
|
||||
|
||||
|
||||
@pytest.mark.parametrize("stored", [{"calibrated": True}, {"zero_mm": 12.5, "calibrated": True}])
|
||||
def test_loading_incomplete_press_calibration_does_not_invent_measurements(stored):
|
||||
import json
|
||||
from orisys_autocal import preferences
|
||||
from orisys_autocal.motion.pose_move import PressAxis
|
||||
|
||||
Path(preferences.path()).write_text(json.dumps({"press_axis": stored}), encoding="utf-8")
|
||||
loaded = preferences.load_preferences()
|
||||
assert PressAxis.from_settings(loaded["press_axis"]).target_for(20) is None
|
||||
|
||||
|
||||
def test_the_preference_path_is_redirected_under_the_scratch_root():
|
||||
from orisys_autocal.preferences import path
|
||||
|
||||
|
||||
Reference in New Issue
Block a user