def test_cancelConnectUNIXFailedTimeout(self):
        """
        Similar to L{test_cancelConnectUNIXTimeout}, but for the case where the
        connection attempt fails.
        """
        def connect(reactor, cc):
            d = cc.connectUNIX('/foo/bar')
            address, factory, timeout, bindAddress = reactor.unixClients.pop()
            return d, factory
        return self._cancelConnectFailedTimeoutTest(connect)

        Similar to L{test_cancelConnectUNIXTimeout}, but for the case where the
        connection attempt fails.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_protocol.py