def assertErrnoException(self, errno, expectedClass):
        """
        When called with a tuple with the given errno,
        L{error.getConnectError} returns an exception which is an instance of
        the expected class.
        """
        e = (errno, "lalala")
        result = error.getConnectError(e)
        self.assertCorrectException(errno, "lalala", result, expectedClass)

        When called with a tuple with the given errno,
        L{error.getConnectError} returns an exception which is an instance of
        the expected class.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_error.py