Skip to content

Commit

Permalink
685 update rotation smargon test to check VMAX
Browse files Browse the repository at this point in the history
  • Loading branch information
d-perl committed Mar 8, 2024
1 parent 27a9573 commit ef6c074
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,8 @@ def fake_create_rotation_devices(
smargon.omega.velocity.set = mock_omega_velocity_sets
smargon.omega.set = mock_omega_sets

smargon.omega.max_velocity.sim_put(131) # type: ignore

return RotationScanComposite(
attenuator=attenuator,
backlight=backlight,
Expand Down
8 changes: 4 additions & 4 deletions tests/unit_tests/experiment_plans/test_rotation_scan_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from ophyd.status import Status

from hyperion.experiment_plans.rotation_scan_plan import (
DEFAULT_MAX_VELOCITY,
RotationScanComposite,
calculate_motion_profile,
rotation_scan,
Expand Down Expand Up @@ -202,6 +201,8 @@ def test_full_rotation_plan_smargon_settings(
params: RotationInternalParameters = test_rotation_params
expt_params = params.experiment_params

test_max_velocity = smargon.omega.max_velocity.get()

omega_set: MagicMock = smargon.omega.set # type: ignore
omega_velocity_set: MagicMock = smargon.omega.velocity.set # type: ignore
rotation_speed = (
Expand All @@ -216,9 +217,9 @@ def test_full_rotation_plan_smargon_settings(
assert omega_set.call_count == 2
assert omega_velocity_set.call_count == 3
assert omega_velocity_set.call_args_list == [
call(DEFAULT_MAX_VELOCITY),
call(test_max_velocity),
call(rotation_speed),
call(DEFAULT_MAX_VELOCITY),
call(test_max_velocity),
]


Expand Down Expand Up @@ -278,4 +279,3 @@ class MyTestException(Exception):
)
assert "Experiment fails because this is a test" in exc.value.args[0]
cleanup_plan.assert_called_once()

0 comments on commit ef6c074

Please sign in to comment.