明确 Autocal 录制按钮及中止结果
区分连续录制和到档标记,并验证中止重试的目录数量。相关测试与代码检查通过。
This commit is contained in:
@@ -163,6 +163,29 @@ def test_manual_trial_records_video_stamps_and_load_unload_events(tmp_dir):
|
||||
assert session["sensor_model"] == "Finger D40"
|
||||
assert session["reference_file"] == "reference.csv"
|
||||
assert session["site"]["mesh_sha256"]
|
||||
assert len(list(tmp_dir.glob("*/session.json"))) == 1
|
||||
|
||||
second_directory = trial.start(
|
||||
root=tmp_dir,
|
||||
site=site,
|
||||
levels=[5, 10],
|
||||
hold_s=20,
|
||||
sensor_model="Finger D40",
|
||||
sensor_sn="F-001",
|
||||
bundle_path=str(bundle),
|
||||
source={"kind": "camera", "value": 0},
|
||||
config_ref=str(config),
|
||||
fps=30,
|
||||
)
|
||||
worker.emit()
|
||||
trial.confirm(5)
|
||||
trial.finish(aborted=True, reason="operator aborted")
|
||||
trial.recorder.stop(wait=True)
|
||||
assert trial.poll() == "incomplete"
|
||||
assert len(list(tmp_dir.glob("*/session.json"))) == 2
|
||||
assert second_directory != directory
|
||||
with (second_directory / "reference.csv").open(encoding="utf-8", newline="") as handle:
|
||||
assert [row["F_ref_normal_N"] for row in csv.DictReader(handle)] == ["5.0"]
|
||||
|
||||
|
||||
def test_calibration_page_keeps_precise_uv_site_when_switching_to_live_view(
|
||||
@@ -186,7 +209,14 @@ def test_calibration_page_keeps_precise_uv_site_when_switching_to_live_view(
|
||||
uv_max=(1, 1),
|
||||
)
|
||||
panel = window.calibration_panel
|
||||
assert panel.start_button.text() == t("calibration.start")
|
||||
for key, button in (
|
||||
("start", panel.start_button),
|
||||
("confirm", panel.confirm_button),
|
||||
("finish", panel.finish_button),
|
||||
("abort", panel.abort_button),
|
||||
):
|
||||
assert button.text() == t(f"calibration.{key}")
|
||||
assert button.toolTip() == t(f"calibration.{key}_tip")
|
||||
assert panel.target_label.text() == t("calibration.before_start")
|
||||
panel.set_flat(flat, "bundle")
|
||||
panel._picked(2, 1)
|
||||
|
||||
Reference in New Issue
Block a user