def repr_failure(self, excinfo):
if isinstance(excinfo.value, TestFailuresInfo):<EOL><INDENT>exc = excinfo.value<EOL>failures = exc.data.entry(_FAILURES_KW)<EOL>messages = []<EOL>for details in failures:<EOL><INDENT>type_ = details.entry(_TYPE_KW)<EOL>if type_ == _FAILURE_KW:<EOL><INDENT>messages.append(self._failure_msg(details))<EOL><DEDENT>elif type_ == _ERROR_KW:<EOL><INDENT>exc = details.entry(_ACTUAL_KW)<EOL>line = details.entry(_LINE_KW)<EOL>messages.append(self._error_msg(exc, line=line))<EOL><DEDENT>else:<EOL><INDENT>assert False, "<STR_LIT>"<EOL><DEDENT><DEDENT>return "<STR_LIT>".join(messages)<EOL><DEDENT>elif isinstance(excinfo.value, Exception):<EOL><INDENT>return self._error_msg(excinfo.value)<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
Representation function called when self.runtest() raises an
        exception.