import HTMLTestRunner
class HTMLReporter(object):
def reporter(self,filename,reportername,reporterdiscripe,rev_runsuit):
#文件名不能是中文
path = "../RoprterModel" +filename
with open(path,"wb") as f:
HTMLTestRunner.HTMLTestRunner(
stream=f,
title=reportername,
#当是2的时候可以出现多行的数据,1的时候不能出现多行
verbosity=2,
description=reporterdescriper
).run(rev_runsuit)
时间: 2024-10-10 15:24:07