From 78b407fb43d74f3d0bbe4d9f0e595f2ffda57386 Mon Sep 17 00:00:00 2001 From: Joe Knapper Date: Tue, 24 Feb 2026 13:46:24 +0000 Subject: [PATCH] Apply suggestions from code review of branch scan-params Co-authored-by: Beth Probert --- tests/unit_tests/test_stack.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit_tests/test_stack.py b/tests/unit_tests/test_stack.py index 0c5869f5..70ea6077 100644 --- a/tests/unit_tests/test_stack.py +++ b/tests/unit_tests/test_stack.py @@ -735,7 +735,7 @@ def test_run_basic_stack_simple( call.kwargs["z"] for call in autofocus_thing._stage.move_relative.call_args_list ] # Two moves in the stack, no other movement as stack began from the starting position - expected_moves = [10, 10] + expected_moves = [stack_params.stack_dz, stack_params.stack_dz] assert moves == expected_moves, ( "Stage move_relative calls do not match expected increments" ) @@ -777,7 +777,7 @@ def test_run_basic_stack_center_origin( ) # Calculate expected starting offset - moving down by half the stack height - total_range = 10 * (5 - 1) + total_range = stack_params.stack_dz * (stack_params.images_to_save - 1) expected_offset = -total_range // 2 # First move should apply center offset @@ -885,7 +885,7 @@ def test_run_basic_stack_end_origin(autofocus_thing, mocker, fake_capture): autofocus_thing.run_basic_stack(stack_params, capture_params) # Calculate the stack offset based on StackOrigin.END - moving down by the full stack height - total_range = 10 * (4 - 1) + total_range = stack_params.stack_dz * (stack_params.images_to_save - 1) # First move should shift fully down first_call = autofocus_thing._stage.move_relative.call_args_list[0]