Update unit tests for new cancel behaviour

This commit is contained in:
Julian Stirling 2026-07-02 16:27:51 +01:00
parent 26a2e1a582
commit d25ebabc77
2 changed files with 16 additions and 8 deletions

View file

@ -559,7 +559,7 @@ def test_run_scan_cancelled(scan_thing_mocked_for_run_scan, caplog, mocker):
scan_thing, "_main_scan_loop", side_effect=InvocationCancelledError()
)
result, logs, calls = check_run_scan(scan_thing, caplog)
result, logs, calls = check_run_scan(scan_thing, caplog, InvocationCancelledError)
assert result == "cancelled by user"
# No logs at warning level.
@ -571,7 +571,7 @@ def test_run_scan_cancelled(scan_thing_mocked_for_run_scan, caplog, mocker):
"cam_change_streaming_mode_calls": 2,
"main_scan_loop_calls": 1,
"return_to_start_calls": 1,
"perform_final_stitch_calls": 1,
"perform_final_stitch_calls": 0,
"save_scan_data_calls": 2,
}
assert calls == expected_calls_numbers