def test_cancel(question, qtbot):
 with qtbot.waitSignals([question.cancelled, question.completed], order='strict'):
  question.cancel()
 assert (not question.is_aborted)

def test_cancel ( question , qtbot ) : with qtbot . waitSignals ( [ question . cancelled , question . completed ] , order = 'strict' ) : question . cancel ( ) assert ( not question . is_aborted )
test question .