def test_singleshot(timer):
 assert (not timer.isSingleShot())
 timer.setSingleShot(True)
 assert timer.isSingleShot()
 timer.start()
 assert timer.isActive()
 timer.timeout.emit()
 assert (not timer.isActive())

def test_singleshot ( timer ) : assert ( not timer . isSingleShot ( ) ) timer . setSingleShot ( True ) assert timer . isSingleShot ( ) timer . start ( ) assert timer . isActive ( ) timer . timeout . emit ( ) assert ( not timer . isActive ( ) )
test setting singleshot .