资源简介
1、增加报告加载样式初始化,更多样化
2、将失败&错误拆分成失败和错误
3、对标签切换方法进行了优化
代码片段和文件信息
#coding=utf-8
“““
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
- 上一篇:基于Diff算法的文本文件比对工具
- 下一篇:python应用-股票数据爬取
评论
共有 条评论