Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor test_move_to_zero() #678

Merged
merged 12 commits into from
Jul 29, 2022
5 changes: 5 additions & 0 deletions apstools/devices/tests/test_positioner_soft_done.py
Original file line number Diff line number Diff line change
@@ -230,7 +230,12 @@ def test_move_to_zero(target, rbv, pos):
# start from known position
known_start_position = -1
pos.setpoint.put(known_start_position)
short_delay_for_EPICS_IOC_database_processing()
rbv.put(known_start_position) # note: pos.readback is read-only
short_delay_for_EPICS_IOC_database_processing(1)
assert pos.inposition
assert pos.setpoint.get(use_monitor=False) == known_start_position
assert round(pos.readback.get(use_monitor=False), 2) == known_start_position

delay_time = round(0.2 + 0.7 * random.random(), 1)