html_test_runner

Posted 两掺豆腐脑丶

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html_test_runner相关的知识,希望对你有一定的参考价值。

"""
A TestRunner for use with the Python unit testing framework. It
generates a html report to show the result at a glance.
The simplest way to use this is to invoke its main method. E.g.
    import unittest
    import HTMLTestRunner
    ... define your tests ...
    if __name__ == \'__main__\':
        HTMLTestRunner.main()
For more customization options, instantiates a HTMLTestRunner object.
HTMLTestRunner is a counterpart to unittest\'s TextTestRunner. E.g.
    # output to a file
    fp = file(\'my_report.html\', \'wb\')
    runner = HTMLTestRunner.HTMLTestRunner(
                stream=fp,
                title=\'My unit test\',
                description=\'This demonstrates the report output by HTMLTestRunner.\'
                )
    # Use an external stylesheet.
    # See the Template_mixin class for more customizable options
    runner.STYLESHEET_TMPL = \'<link rel="stylesheet&

以上是关于html_test_runner的主要内容,如果未能解决你的问题,请参考以下文章

html_test_runner