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


Python TestResult.end_test方法代码示例

本文整理汇总了Python中avocado.result.TestResult.end_test方法的典型用法代码示例。如果您正苦于以下问题:Python TestResult.end_test方法的具体用法?Python TestResult.end_test怎么用?Python TestResult.end_test使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在avocado.result.TestResult的用法示例。


在下文中一共展示了TestResult.end_test方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: end_test

# 需要导入模块: from avocado.result import TestResult [as 别名]
# 或者: from avocado.result.TestResult import end_test [as 别名]
    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,代码行数:9,代码来源:vm.py

示例2: end_test

# 需要导入模块: from avocado.result import TestResult [as 别名]
# 或者: from avocado.result.TestResult import end_test [as 别名]
 def end_test(self, test):
     """
     Record an end test event, accord to the given test status.
     """
     TestResult.end_test(self, test)
     if test.status == 'PASS':
         self.xml.add_success(test)
     if test.status == 'TEST_NA':
         self.xml.add_skip(test)
     if test.status == 'FAIL':
         self.xml.add_failure(test)
     if test.status == 'ERROR':
         self.xml.add_error(test)
开发者ID:eduardok,项目名称:avocado,代码行数:15,代码来源:xunit.py

示例3: end_test

# 需要导入模块: from avocado.result import TestResult [as 别名]
# 或者: from avocado.result.TestResult import end_test [as 别名]
    def end_test(self, test):
        """
        Called when the given test has been run.

        :param test: an instance of :class:`avocado.test.Test`.
        """
        TestResult.end_test(self, test)
        self.stream.stop_file_logging()
        t = {'test': test.tagged_name,
             'url': test.name,
             'time': test.time_elapsed,
             'status': test.status,
             }
        self.json['tests'].append(t)
开发者ID:eduardok,项目名称:avocado,代码行数:16,代码来源:jsonresult.py

示例4: end_test

# 需要导入模块: from avocado.result import TestResult [as 别名]
# 或者: from avocado.result.TestResult import end_test [as 别名]
    def end_test(self, state):
        """
        Record an end test event, accord to the given test status.

        :param state: result of :class:`avocado.test.Test.get_state`.
        :type state: dict
        """
        TestResult.end_test(self, state)
        if state['status'] in ('PASS', 'WARN'):
            self.xml.add_success(state)
        elif state['status'] == 'TEST_NA':
            self.xml.add_skip(state)
        elif state['status'] == 'FAIL':
            self.xml.add_failure(state)
        elif state['status'] == 'ERROR':
            self.xml.add_error(state)
开发者ID:ypu,项目名称:avocado,代码行数:18,代码来源:xunit.py

示例5: end_test

# 需要导入模块: from avocado.result import TestResult [as 别名]
# 或者: from avocado.result.TestResult import end_test [as 别名]
    def end_test(self, state):
        """
        Called when the given test has been run.

        :param state: result of :class:`avocado.test.Test.get_state`.
        :type state: dict
        """
        TestResult.end_test(self, state)
        if 'job_id' not in self.json:
            self.json['job_id'] = state['job_unique_id']
        t = {'test': state['tagged_name'],
             'url': state['name'],
             'time': state['time_elapsed'],
             'status': state['status'],
             'whiteboard': state['whiteboard'],
             }
        self.json['tests'].append(t)
开发者ID:FengYang,项目名称:avocado,代码行数:19,代码来源:jsonresult.py

示例6: end_test

# 需要导入模块: from avocado.result import TestResult [as 别名]
# 或者: from avocado.result.TestResult import end_test [as 别名]
    def end_test(self, state):
        """
        Called when the given test has been run.

        :param state: result of :class:`avocado.test.Test.get_state`.
        :type state: dict
        """
        TestResult.end_test(self, state)
        if state['fail_reason'] is None:
            state['fail_reason'] = ''
        else:
            state['fail_reason'] = str(state['fail_reason'])
        t = {'test': state['tagged_name'],
             'url': state['name'],
             'time_start': state['time_start'],
             'time_end': state['time_end'],
             'time': state['time_elapsed'],
             'status': state['status'],
             'fail_reason': state['fail_reason'],
             'whiteboard': state['whiteboard'],
             'logdir': state['logdir'],
             'logfile': state['logfile']
             }
        self.json['tests'].append(t)
开发者ID:PyLearner,项目名称:avocado,代码行数:26,代码来源:htmlresult.py

示例7: end_test

# 需要导入模块: from avocado.result import TestResult [as 别名]
# 或者: from avocado.result.TestResult import end_test [as 别名]
 def end_test(self, state):
     self.lazy_init_journal(state)
     TestResult.end_test(self, state)
     self._record_status(state, "ENDED")
开发者ID:PyLearner,项目名称:avocado,代码行数:6,代码来源:journal.py

示例8: end_test

# 需要导入模块: from avocado.result import TestResult [as 别名]
# 或者: from avocado.result.TestResult import end_test [as 别名]
 def end_test(self, test):
     TestResult.end_test(self, test)
     self._record_status(test, "ENDED")
开发者ID:eduardok,项目名称:avocado,代码行数:5,代码来源:journal.py


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