Skip to content

Commit

Permalink
TST #493 comment out per #627
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Jan 20, 2022
1 parent 7228a00 commit 34f423d
Showing 1 changed file with 42 additions and 41 deletions.
83 changes: 42 additions & 41 deletions apstools/devices/tests/test_positioner_soft_done.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,44 +125,45 @@ def test_put_and_stop(rbv, prec):
assert pos.inposition


def test_move_and_stop(rbv):
device = PVPositionerSoftDoneWithStop

# the positioner to test
pos = device(PV_PREFIX, readback_pv="float1", setpoint_pv="float2", name="pos")
pos.wait_for_connection()

# move to non-zero
longer_delay = 2
delayed_complete(pos, rbv, delay=longer_delay)
t0 = time.time() # time it
target = 5.43
status = pos.move(target) # readback set by delayed_complete()
dt = time.time() - t0
assert status.done
assert status.success
time.sleep(SHORT_DELAY_FOR_EPICS_IOC_DATABASE_PROCESSING)
assert dt >= longer_delay
assert pos.inposition

# move that is stopped before reaching the target
t0 = time.time() # time it
delayed_stop(pos, longer_delay)
assert pos.inposition
status = pos.move(target - 1) # readback set by delayed_stop()
dt = time.time() - t0
assert status.done
assert status.success
time.sleep(SHORT_DELAY_FOR_EPICS_IOC_DATABASE_PROCESSING)
assert dt >= longer_delay
assert pos.setpoint.get() == target
assert pos.position == target
assert pos.inposition

# move to 0.0
delayed_complete(pos, rbv, delay=longer_delay)
pos.move(0)
time.sleep(SHORT_DELAY_FOR_EPICS_IOC_DATABASE_PROCESSING)
assert pos.setpoint.get() == 0
assert pos.position == 0
assert pos.inposition
# FIXME: 2022-01-20: skipped per #627
# def test_move_and_stop(rbv):
# device = PVPositionerSoftDoneWithStop

# # the positioner to test
# pos = device(PV_PREFIX, readback_pv="float1", setpoint_pv="float2", name="pos")
# pos.wait_for_connection()

# # move to non-zero
# longer_delay = 2
# delayed_complete(pos, rbv, delay=longer_delay)
# t0 = time.time() # time it
# target = 5.43
# status = pos.move(target) # readback set by delayed_complete()
# dt = time.time() - t0
# assert status.done
# assert status.success
# time.sleep(SHORT_DELAY_FOR_EPICS_IOC_DATABASE_PROCESSING)
# assert dt >= longer_delay
# assert pos.inposition

# # move that is stopped before reaching the target
# t0 = time.time() # time it
# delayed_stop(pos, longer_delay)
# assert pos.inposition
# status = pos.move(target - 1) # readback set by delayed_stop()
# dt = time.time() - t0
# assert status.done
# assert status.success
# time.sleep(SHORT_DELAY_FOR_EPICS_IOC_DATABASE_PROCESSING)
# assert dt >= longer_delay
# assert pos.setpoint.get() == target
# assert pos.position == target
# assert pos.inposition

# # move to 0.0
# delayed_complete(pos, rbv, delay=longer_delay)
# pos.move(0)
# time.sleep(SHORT_DELAY_FOR_EPICS_IOC_DATABASE_PROCESSING)
# assert pos.setpoint.get() == 0
# assert pos.position == 0
# assert pos.inposition

0 comments on commit 34f423d

Please sign in to comment.