TA的每日心情 | 奋斗 2016-12-12 22:10 |
---|
签到天数: 12 天 连续签到: 1 天 [LV.3]测试连长
|
代码如下:
if __name__ == "__main__":
testunit = unittest.TestSuite()
testunit.addTest(Cdn1_web('cdn1_login'))
testunit.addTest(Baidu('cdn1_action'))
filename = r'C:\Users\vito\Desktop\python_test\result.html'
with open(filename,'wb') as fp:
runner = HTMLTestRunner.HTMLTestRunner(
stream = fp,
title = u'cdn1_web测试报告',
description = u'用例执行情况')
runner.run(testunit)
运行报错:
self.stream.write(output.encode('utf8'))
ValueError: write to closed file
实在想不出问题在哪?哪位帮忙看看,tks
|
|