Ejemplo n.º 1
0
def test_seqdev(session):
    # Device move
    sm1 = session.getDevice('sm1')
    sd = SeqDev(sm1, 3)
    assert repr(sd) == 'sm1 -> 3.000'
    sm1.start(0)
    sm1.wait()
    assert sm1.read(0) == 0

    sd.check()
    sd.run()
    while not sd.isCompleted():
        pass
    assert sm1.read(0) == 3
Ejemplo n.º 2
0
 def isCompleted(self):
     if NicosSeqDev.isCompleted(self):
         session.delay(0.5)  # catch too early IDLE
         return NicosSeqDev.isCompleted(self) and \
                self.dev.status(0)[0] != status.BUSY