From a5b77cc2a34a81886eeacb31080ede74ce6e38a8 Mon Sep 17 00:00:00 2001 From: Joe Knapper Date: Thu, 19 Feb 2026 15:29:04 +0000 Subject: [PATCH] Add settings to test_scan_workflows --- tests/unit_tests/test_scan_workflows.py | 14 ++++++++++++++ tests/unit_tests/test_stack.py | 2 -- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/unit_tests/test_scan_workflows.py b/tests/unit_tests/test_scan_workflows.py index 40e62cc9..50c27cdc 100644 --- a/tests/unit_tests/test_scan_workflows.py +++ b/tests/unit_tests/test_scan_workflows.py @@ -258,6 +258,13 @@ def test_histo_acquisition_not_skipping_background(histo_workflow, mocker, caplo # Mocking for settings as above mock_settings = mocker.Mock() mock_settings.skip_background = False + mock_settings.smart_stack_params = SmartStackParams( + stack_dz=5, + images_to_save=3, + min_images_to_test=3, + save_on_failure=True, + check_turning_points=True, + ) # Set up background detector to say it is empty, this shouldn't stop stacking. histo_workflow._background_detector.image_is_sample.return_value = ( @@ -296,6 +303,13 @@ def test_histo_acquisition_on_sample(histo_workflow, mocker, caplog): # Mocking for settings as above mock_settings = mocker.Mock() mock_settings.skip_background = True + mock_settings.smart_stack_params = SmartStackParams( + stack_dz=5, + images_to_save=3, + min_images_to_test=3, + save_on_failure=False, + check_turning_points=True, + ) # Set up background detector to say there is sample. histo_workflow._background_detector.image_is_sample.return_value = (True, None) diff --git a/tests/unit_tests/test_stack.py b/tests/unit_tests/test_stack.py index c4154c92..4f959bcf 100644 --- a/tests/unit_tests/test_stack.py +++ b/tests/unit_tests/test_stack.py @@ -364,8 +364,6 @@ def test_run_smart_stack(pass_on, histo_scan_workflow, autofocus_thing, mocker): stack_parameters=scan_settings.smart_stack_params, capture_parameters=scan_settings.capture_params, autofocus_parameters=scan_settings.autofocus_params, - save_on_failure=False, - check_turning_points=True, ) # Only passes if the attempt it passes on is less than max attempts