# 关闭文件流,不关的话生成的报告是空的
fp.close()
这个文件我在pycharm里debug执行正确,但运行时报错:
Traceback (most recent call last):
File "D:/testpython/cover/html.py", line 31, in <module>
runner.run(createsuite1())
File "D:/testpython/cover/html.py", line 18, in createsuite1
testunit1.addTests(test_case)
File "C:\Program Files\Python36\lib\unittest\suite.py", line 57, in addTests
for test in tests:
TypeError: '_FailedTest' object is not iterable