def test_connectByServiceFail(self):
        """
        Connecting to a named service which does not exist raises
        L{error.ServiceNameUnknownError}.
        """
        self.assertRaises(
            error.ServiceNameUnknownError,
            reactor.connectTCP,
            "127.0.0.1", "thisbetternotexist", MyClientFactory())

        Connecting to a named service which does not exist raises
        L{error.ServiceNameUnknownError}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_tcp.py