'In case of failure, L{ProcessEndpoint.connect} returns a Deferred that
fails.'

def test_connectFailure(self):

    def testSpawnProcess(pp, executable, args, env, path, uid, gid, usePTY, childFDs):
        raise Exception()
    self.ep._spawnProcess = testSpawnProcess
    d = self.ep.connect(self.factory)
    error = self.failureResultOf(d)
    error.trap(Exception)
