def test_errno(self):
        """
        L{error.getConnectError} converts based on errno for C{socket.error}.
        """
        self.assertErrnoException(errno.ENETUNREACH, error.NoRouteError)
        self.assertErrnoException(errno.ECONNREFUSED, error.ConnectionRefusedError)
        self.assertErrnoException(errno.ETIMEDOUT, error.TCPTimedOutError)
        if platformType == "win32":
            self.assertErrnoException(errno.WSAECONNREFUSED, error.ConnectionRefusedError)
            self.assertErrnoException(errno.WSAENETUNREACH, error.NoRouteError)

        L{error.getConnectError} converts based on errno for C{socket.error}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_error.py