其他分享
首页 > 其他分享> > beautiful 模板

beautiful 模板

作者:互联网

import unittest,yagmail,time
from BeautifulReport import BeautifulReport as bf #导入BeautifulReport
if __name__ == '__main__':
#注意4个空格

#Beautiful
suit = unittest.TestSuite()
suit.addTest(Detail("test_detail"))#乘客订单详情
run = bf(suit)  # 实例化beautiful
run.report(description='测试进行中', filename='oride_report',report_dir=r'C:\Users\hui\PycharmProjects\new_oride\report')

#mail
yag = yagmail.SMTP(user='xx@qq.com', password='gtn', host='smtp.qq.com', port='465')
body = "测试环境,api"
yag.send(to=['yy@qq.com'], subject='api测试中', contents=[body,r'C:\Users\hui\PycharmProjects\new_oride\report\oride_report.html'])
print("已发送邮件")


标签:beautiful,__,oride,qq,BeautifulReport,suit,report,模板
来源: https://www.cnblogs.com/yanhuidj/p/11969324.html