unittest HTMLTestRunner HTMLTestRunner time (unittest.TestCase): (): () (): () (): () (): () __name__ == : suite=unittest.TestSuite() suite.addTest(Test()) suite.addTest(Test()) now=time.strftime() filename=+ now +fp=(filename) runner = HTMLTestRunner(=fp= = ) runner.run(suite) fp.close()
原文地址:http://357712148.blog.51cto.com/6440370/1983174