当前位置: 首页>>代码示例>>Python>>正文


Python result.TestResult类代码示例

本文整理汇总了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': []}
开发者ID:eduardok,项目名称:avocado,代码行数:7,代码来源:jsonresult.py

示例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)
开发者ID:eduardok,项目名称:avocado,代码行数:7,代码来源:vm.py

示例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': []}
开发者ID:PyLearner,项目名称:avocado,代码行数:8,代码来源:htmlresult.py

示例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)
开发者ID:eduardok,项目名称:avocado,代码行数:8,代码来源:vm.py

示例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)
开发者ID:eduardok,项目名称:avocado,代码行数:8,代码来源:vm.py

示例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)
开发者ID:eduardok,项目名称:avocado,代码行数:8,代码来源:vm.py

示例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)
开发者ID:FengYang,项目名称:avocado,代码行数:8,代码来源:vm.py

示例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)
开发者ID:eduardok,项目名称:avocado,代码行数:8,代码来源:vm.py

示例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)
开发者ID:eduardok,项目名称:avocado,代码行数:8,代码来源:vm.py

示例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)
开发者ID:FengYang,项目名称:avocado,代码行数:8,代码来源:vm.py

示例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)
开发者ID:FengYang,项目名称:avocado,代码行数:8,代码来源:vm.py

示例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)
开发者ID:FengYang,项目名称:avocado,代码行数:8,代码来源:vm.py

示例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)
开发者ID:FengYang,项目名称:avocado,代码行数:8,代码来源:vm.py

示例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)
开发者ID:FengYang,项目名称:avocado,代码行数:8,代码来源:vm.py

示例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})
开发者ID:FengYang,项目名称:avocado,代码行数:9,代码来源:vm.py


注:本文中的avocado.result.TestResult类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。