tmp\

unittest.case.TestCase#_feedErrorsToResult

def _feedErrorsToResult(self, result, errors):
    for test, exc_info in errors:
        if isinstance(test, _SubTest):
            result.addSubTest(test.test_case, test, exc_info)
        elif exc_info is not None:
            if issubclass(exc_info[0], self.failureException):
                result.addFailure(test, exc_info)
            else:
                result.addError(test, exc_info)

    errors = self._outcome.errors
    sql = """SELECT log_time, error_severity, message , query FROM pglog ORDER BY log_time DESC"""
    for test, exc_info in errors:
        if exc_info:
            # dosomething
            pass
posted @ 2019-04-04 18:57  两只老虎111  阅读(168)  评论(0编辑  收藏  举报