def test_quteproc_error_message_did_fail(qtbot, quteproc, request_mock):
 request_mock.node.rep_call.failed = True
 with qtbot.waitSignal(quteproc.got_error):
  quteproc.send_cmd(':message-error test')
 quteproc.after_test()

def test_quteproc_error_message_did_fail ( qtbot , quteproc , request_mock ) : request_mock . node . rep_call . failed = True with qtbot . waitSignal ( quteproc . got_error ) : quteproc . send_cmd ( ':message-error test' ) quteproc . after_test ( )
make sure the test does not fail on teardown if the main test failed .