Add settings to test_scan_workflows
This commit is contained in:
parent
331ceb705d
commit
a5b77cc2a3
2 changed files with 14 additions and 2 deletions
|
|
@ -258,6 +258,13 @@ def test_histo_acquisition_not_skipping_background(histo_workflow, mocker, caplo
|
||||||
# Mocking for settings as above
|
# Mocking for settings as above
|
||||||
mock_settings = mocker.Mock()
|
mock_settings = mocker.Mock()
|
||||||
mock_settings.skip_background = False
|
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.
|
# Set up background detector to say it is empty, this shouldn't stop stacking.
|
||||||
histo_workflow._background_detector.image_is_sample.return_value = (
|
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
|
# Mocking for settings as above
|
||||||
mock_settings = mocker.Mock()
|
mock_settings = mocker.Mock()
|
||||||
mock_settings.skip_background = True
|
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.
|
# Set up background detector to say there is sample.
|
||||||
histo_workflow._background_detector.image_is_sample.return_value = (True, None)
|
histo_workflow._background_detector.image_is_sample.return_value = (True, None)
|
||||||
|
|
|
||||||
|
|
@ -364,8 +364,6 @@ def test_run_smart_stack(pass_on, histo_scan_workflow, autofocus_thing, mocker):
|
||||||
stack_parameters=scan_settings.smart_stack_params,
|
stack_parameters=scan_settings.smart_stack_params,
|
||||||
capture_parameters=scan_settings.capture_params,
|
capture_parameters=scan_settings.capture_params,
|
||||||
autofocus_parameters=scan_settings.autofocus_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
|
# Only passes if the attempt it passes on is less than max attempts
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue