def METHOD_NAME():
    """If QProcess fails, wait for raise an exception"""
    #
    # We have to do a *lot* of mocking to get this test to work:
    # - The process needs to be able to "run"
    # - The wait needs to complete
    # - And the result of the wait needs to indicate a failure
    #
    with mock.patch.object(
        QProcess, "waitForFinished", return_value=False
    ), mock.patch.object(
        QProcess, "exitStatus", return_value=QProcess.CrashExit
    ), mock.patch.object(
        QProcess, "start"
    ):
        p = virtual_environment.Process()
        p.run(None, None)
        with pytest.raises(virtual_environment.VirtualEnvironmentError):
            p.wait()