本文整理汇总了Python中avocado.result.TestResult类的典型用法代码示例。如果您正苦于以下问题:Python TestResult类的具体用法?Python TestResult怎么用?Python TestResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TestResult类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: start_tests
def start_tests(self):
"""
Called once before any tests are executed.
"""
TestResult.start_tests(self)
self.json = {'debuglog': self.stream.debuglog,
'tests': []}
示例2: end_test
def end_test(self, test):
"""
Called when the given test has been run.
:param test: :class:`avocado.test.Test` instance.
"""
TestResult.end_test(self, test)
示例3: start_tests
def start_tests(self):
"""
Called once before any tests are executed.
"""
TestResult.start_tests(self)
self.json = {'debuglog': self.stream.logfile,
'job_id': runtime.CURRENT_JOB.unique_id,
'tests': []}
示例4: add_warn
def add_warn(self, test):
"""
Called when a test had a warning.
:param test: :class:`avocado.test.Test` instance.
"""
TestResult.add_warn(self, test)
self.stream.log_warn(test.time_elapsed)
示例5: add_error
def add_error(self, test):
"""
Called when a test had a setup error.
:param test: :class:`avocado.test.Test` instance.
"""
TestResult.add_error(self, test)
self.stream.log_error(test.time_elapsed)
示例6: add_pass
def add_pass(self, test):
"""
Called when a test succeeded.
:param test: :class:`avocado.test.Test` instance.
"""
TestResult.add_pass(self, test)
self.stream.log_pass(test.time_elapsed)
示例7: add_warn
def add_warn(self, test):
"""
Called when a test had a warning.
:param test: :class:`avocado.test.Test` instance.
"""
TestResult.add_warn(self, test)
self.stream.set_test_status(status='WARN', state=test)
示例8: add_fail
def add_fail(self, test):
"""
Called when a test fails.
:param test: :class:`avocado.test.Test` instance.
"""
TestResult.add_fail(self, test)
self.stream.log_fail(test.time_elapsed)
示例9: add_skip
def add_skip(self, test):
"""
Called when a test is skipped.
:param test: :class:`avocado.test.Test` instance.
"""
TestResult.add_skip(self, test)
self.stream.log_skip(test.time_elapsed)
示例10: add_fail
def add_fail(self, test):
"""
Called when a test fails.
:param test: :class:`avocado.test.Test` instance.
"""
TestResult.add_fail(self, test)
self.stream.set_test_status(status='FAIL', state=test)
示例11: add_skip
def add_skip(self, test):
"""
Called when a test is skipped.
:param test: :class:`avocado.test.Test` instance.
"""
TestResult.add_skip(self, test)
self.stream.set_test_status(status='SKIP', state=test)
示例12: add_not_found
def add_not_found(self, test):
"""
Called when a test had a setup error.
:param test: :class:`avocado.test.Test` instance.
"""
TestResult.add_not_found(self, test)
self.stream.set_test_status(status='NOT_FOUND', state=test)
示例13: add_error
def add_error(self, test):
"""
Called when a test had a setup error.
:param test: :class:`avocado.test.Test` instance.
"""
TestResult.add_error(self, test)
self.stream.set_test_status(status='ERROR', state=test)
示例14: add_pass
def add_pass(self, test):
"""
Called when a test succeeded.
:param test: :class:`avocado.test.Test` instance.
"""
TestResult.add_pass(self, test)
self.stream.set_test_status(status='PASS', state=test)
示例15: start_tests
def start_tests(self):
"""
Called once before any tests are executed.
"""
TestResult.start_tests(self)
self.stream.notify(event='message', msg="JOB ID : %s" % self.stream.job_unique_id)
self.stream.notify(event='message', msg="JOB LOG : %s" % self.stream.logfile)
self.stream.notify(event='message', msg="TESTS : %s" % self.tests_total)
self.stream.set_tests_info({'tests_total': self.tests_total})