update run.py.

This commit is contained in:
zy7y 2021-01-20 17:03:44 +08:00 committed by Gitee
parent f86cbd10a9
commit 9706f6cd1d
1 changed files with 9 additions and 1 deletions

10
run.py
View File

@ -25,7 +25,15 @@ def run():
if os.path.exists('report/'):
shutil.rmtree(path='report/')
logger.add(logfile, enqueue=True, encoding='utf-8')
logger.info('开始测试...')
logger.info("""
_ _ _ _____ _
__ _ _ __ (_) / \ _ _| |_ __|_ _|__ ___| |_
/ _` | '_ \| | / _ \| | | | __/ _ \| |/ _ \/ __| __|
| (_| | |_) | |/ ___ \ |_| | || (_) | | __/\__ \ |_
\__,_| .__/|_/_/ \_\__,_|\__\___/|_|\___||___/\__|
|_|
Starting ... ... ...
""")
pytest.main(args=['test/test_api.py', f'--alluredir={report}/data'])
# 自动以服务形式打开报告
# os.system(f'allure serve {report}/data')