@@ -195,8 +195,8 @@ async def test_valid_prepare_velocity(sim_motor: motor.Motor):
195
195
[
196
196
(1 , 10 , 0 , 10 , 30 , - 4.999 ), # Goes below lower_limit, +ve direction
197
197
(1 , 10 , 0 , 10 , 14.99 , - 10 ), # Goes above upper_limit, +ve direction
198
- (1 , - 10 , 10 , 0 , - 30 , - 9.999 ), # Goes below lower_limit, -ve direction
199
- (1 , - 10 , 10 , 0 , 14.99 , - 10 ), # Goes above upper_limit, -ve direction
198
+ (1 , 10 , 10 , 0 , - 30 , - 9.999 ), # Goes below lower_limit, -ve direction
199
+ (1 , 10 , 10 , 0 , 14.99 , - 10 ), # Goes above upper_limit, -ve direction
200
200
],
201
201
)
202
202
async def test_prepare_motor_path_errors (
@@ -231,6 +231,18 @@ async def test_prepare_motor_path(sim_motor: motor.Motor):
231
231
== - 5
232
232
)
233
233
assert sim_motor ._fly_completed_position == 15
234
+ fly_info = motor .FlyMotorInfo (
235
+ start_position = 12 ,
236
+ end_position = 2 ,
237
+ time_for_move = 1 ,
238
+ )
239
+ assert (
240
+ await sim_motor ._prepare_motor_path (
241
+ 10 , fly_info .start_position , fly_info .end_position
242
+ )
243
+ == 17
244
+ )
245
+ assert sim_motor ._fly_completed_position == - 3
234
246
235
247
236
248
@pytest .mark .parametrize (
@@ -244,7 +256,7 @@ async def test_prepare(
244
256
sim_motor : motor .Motor , target_position : float , expected_velocity : float
245
257
):
246
258
set_mock_value (sim_motor .acceleration_time , 1 )
247
- set_mock_value (sim_motor .low_limit_travel , - 10 )
259
+ set_mock_value (sim_motor .low_limit_travel , - 15 )
248
260
set_mock_value (sim_motor .high_limit_travel , 20 )
249
261
set_mock_value (sim_motor .max_velocity , 10 )
250
262
fake_set_signal = soft_signal_rw (float )
0 commit comments