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


Python HTMLTestRunner.HTMLTestRunner方法代码示例

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


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

示例1: generateReport

# 需要导入模块: import HTMLTestRunner [as 别名]
# 或者: from HTMLTestRunner import HTMLTestRunner [as 别名]
def generateReport(self, test, result):
        report_attrs = self.getReportAttributes(result)
        generator = 'HTMLTestRunner %s' % __version__
        stylesheet = self._generate_stylesheet()
        heading = self._generate_heading(report_attrs)
        report = self._generate_report(result)
        ending = self._generate_ending()
        output = self.HTML_TMPL % dict(
            title = saxutils.escape(self.title),
            generator = generator,
            stylesheet = stylesheet,
            heading = heading,
            report = report,
            ending = ending,
        )
        self.stream.write(output.encode('utf8')) 
开发者ID:huilansame,项目名称:Test_framework,代码行数:18,代码来源:HTMLTestRunner.py

示例2: generateReport

# 需要导入模块: import HTMLTestRunner [as 别名]
# 或者: from HTMLTestRunner import HTMLTestRunner [as 别名]
def generateReport(self, test, result):
        report_attrs = self.getReportAttributes(result)
        generator = 'HTMLTestRunner %s' % __version__
        stylesheet = self._generate_stylesheet()
        heading = self._generate_heading(report_attrs)
        report = self._generate_report(result)
        ending = self._generate_ending()
        output = self.HTML_TMPL % dict(
            title=saxutils.escape(self.title),
            generator=generator,
            stylesheet=stylesheet,
            heading=heading,
            report=report,
            ending=ending,
        )
        self.stream.write(output.encode('utf8')) 
开发者ID:zealzhangz,项目名称:python-selenium-seed,代码行数:18,代码来源:HTMLTestRunner.py

示例3: generateReport

# 需要导入模块: import HTMLTestRunner [as 别名]
# 或者: from HTMLTestRunner import HTMLTestRunner [as 别名]
def generateReport(self, test, result):
        report_attrs = self.getReportAttributes(result)
        generator = 'HTMLTestRunner %s' % __version__
        stylesheet = self._generate_stylesheet()
        heading = self._generate_heading(report_attrs)
        report = self._generate_report(result)
        ending = self._generate_ending()
        chart = self._generate_chart(result)
        output = self.HTML_TMPL % dict(
            title = saxutils.escape(self.title),
            generator = generator,
            stylesheet = stylesheet,
            heading = heading,
            report = report,
            ending = ending,
            chart_script = chart
        )
        self.stream.write(output.encode('utf8')) 
开发者ID:huilansame,项目名称:HTMLTestRunner_PY3,代码行数:20,代码来源:HTMLTestRunner_PY3.py

示例4: generateReport

# 需要导入模块: import HTMLTestRunner [as 别名]
# 或者: from HTMLTestRunner import HTMLTestRunner [as 别名]
def generateReport(self, test, result):
        report_attrs = self.getReportAttributes(result)
        generator = 'HTMLTestRunner %s' % __version__
        stylesheet = self._generate_stylesheet()
        heading = self._generate_heading(report_attrs)
        report = self._generate_report(result)
        ending = self._generate_ending()
        output = self.HTML_TMPL % dict(
            title = saxutils.escape(self.title),
            generator = generator,
            stylesheet = stylesheet,
            heading = heading,
            report = report,
            ending = ending,
        )
        #in Python3 the write method of stdout need know the encoding
        try:
            self.stream.write(output)
        except TypeError:
            self.stream.write(output.encode("utf8")) 
开发者ID:akuing,项目名称:python-http-interface-test,代码行数:22,代码来源:HTMLTestRunner.py

示例5: generateReport

# 需要导入模块: import HTMLTestRunner [as 别名]
# 或者: from HTMLTestRunner import HTMLTestRunner [as 别名]
def generateReport(self, test, result):
        """This is a docstring"""
        report_attrs = self.getReportAttributes(result)
        generator = 'HTMLTestRunner %s' % __version__
        stylesheet = self._generate_stylesheet()
        heading = self._generate_heading(report_attrs)
        report = self._generate_report(result)
        ending = self._generate_ending()
        output = self.HTML_TMPL % dict(
            title = saxutils.escape(self.title),
            generator = generator,
            stylesheet = stylesheet,
            heading = heading,
            report = report,
            ending = ending,
        )
        self.stream.write(output.encode('utf8')) 
开发者ID:fengshuai198904,项目名称:appium,代码行数:19,代码来源:HTMLTestRunner.py

示例6: generateReport

# 需要导入模块: import HTMLTestRunner [as 别名]
# 或者: from HTMLTestRunner import HTMLTestRunner [as 别名]
def generateReport(self, test, result):
        report_attrs = self.getReportAttributes(result)
        generator = 'HTMLTestRunner %s' % __version__
        stylesheet = self._generate_stylesheet()
        heading = self._generate_heading(report_attrs)
        report = self._generate_report(result)
        ending = self._generate_ending()
        output = self.HTML_TMPL % dict(
            title = saxutils.escape(self.title),
            generator = generator,
            stylesheet = stylesheet,
            heading = heading,
            report = report,
            ending = ending,
        )
        #output.as_string()
        self.stream.write(output.encode('utf8')) 
开发者ID:feixiangingk,项目名称:auto_appium,代码行数:19,代码来源:HTMLTestRunner1.py

示例7: runTests

# 需要导入模块: import HTMLTestRunner [as 别名]
# 或者: from HTMLTestRunner import HTMLTestRunner [as 别名]
def runTests(self):
        # Pick HTMLTestRunner as the default test runner.
        # base class's testRunner parameter is not useful because it means
        # we have to instantiate HTMLTestRunner before we know self.verbosity.
        if self.testRunner is None:
            self.testRunner = HTMLTestRunner(verbosity=self.verbosity)
        unittest.TestProgram.runTests(self) 
开发者ID:huilansame,项目名称:Test_framework,代码行数:9,代码来源:HTMLTestRunner.py

示例8: go

# 需要导入模块: import HTMLTestRunner [as 别名]
# 或者: from HTMLTestRunner import HTMLTestRunner [as 别名]
def go(test_output):
    test_output_file = file(test_output, 'wb')
    runner = HTMLTestRunner.HTMLTestRunner(
        stream=test_output_file,
        title='Device Pool Unit Test',
        description='Device Pool Unit Test package',
        verbosity=2)

    super_suite = poolunittest.PoolTestSuite()
    super_suite.addTest(pool.suite())
    runner.run(super_suite) 
开发者ID:sardana-org,项目名称:sardana,代码行数:13,代码来源:go.py

示例9: m3

# 需要导入模块: import HTMLTestRunner [as 别名]
# 或者: from HTMLTestRunner import HTMLTestRunner [as 别名]
def m3(test_output):
    test_output_file = file(test_output, 'wb')
    runner = HTMLTestRunner.HTMLTestRunner(
        stream=test_output_file,
        title='Device Pool Unit Test',
        description='Device Pool Unit Test package',
        verbosity=2)
    runner.run(suite()) 
开发者ID:sardana-org,项目名称:sardana,代码行数:10,代码来源:pool.py


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