Apply suggestions from code review of branch backlash-in-stage

Co-authored-by: Joe Knapper <joe.knapper@glasgow.ac.uk>
This commit is contained in:
Julian Stirling 2026-03-02 11:07:10 +00:00
parent 9ab7e50773
commit d4fbcb6d61
3 changed files with 6 additions and 2 deletions

View file

@ -554,7 +554,7 @@ def test_backlash_compensated_moves(test_case, dummy_stage, mocker):
dummy_stage._hardware_position = dummy_stage._apply_axis_direction(
test_case.position
)
# double check position is set
# check position is set
assert dummy_stage.position == test_case.position
dummy_stage._backlash_state = test_case.backlash_state

View file

@ -487,7 +487,7 @@ def test_move_until_edge_error(rom_thing, mocker):
# Error should be raised even though it is in the Try:
with pytest.raises(RuntimeError, match="Mock"):
rom_thing._move_until_edge("y", direction=-1)
# However the "finally" should have executed returning to the starting position
# However the "finally" should have executed, returning to the starting position
assert rom_thing._stage.move_absolute.call_count == 1
abs_move_kwargs = rom_thing._stage.move_absolute.call_args.kwargs
expected_abs_move_kwargs = dict(