'Return a text representation of an exception thrown by a test
method.'

def get_error_info(self):

    if (not self.err):
        return ''
    return self.test_result._exc_info_to_string(self.err, self.test_method)
