From 57cb822878ed45877595a671d8e28ab6b5ea7d3e Mon Sep 17 00:00:00 2001 From: zhanhuasheng Date: Fri, 8 Mar 2024 16:52:55 +0800 Subject: [PATCH] =?UTF-8?q?allure=E6=8A=A5=E5=91=8A=E4=BC=9A=E6=8A=8A?= =?UTF-8?q?=E6=95=B4=E4=B8=AA=E8=BF=9B=E7=A8=8B=E5=8D=A1=E6=AD=BB=EF=BC=8C?= =?UTF-8?q?=E6=9A=82=E4=B8=8D=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conftest.py | 3 --- main.py | 9 +++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/conftest.py b/conftest.py index 0077b3d..54f70e7 100644 --- a/conftest.py +++ b/conftest.py @@ -1,5 +1,4 @@ import asyncio -from Utils.sql_handler import test_env_conn import pytest import requests import time @@ -110,9 +109,7 @@ def call_fixture(): willdesk_login() customer_login() yield - test_env_conn.close_db() loop = websocket_handler.loop loop.run_until_complete(close_ws()) loop.stop() loop.close() - diff --git a/main.py b/main.py index a68b5ba..c60a184 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,4 @@ import pytest -import asyncio import os from Utils.sql_handler import test_env_conn from Utils import websocket_handler @@ -7,11 +6,13 @@ from Utils import websocket_handler if __name__ == '__main__': try: pytest.main(['-vs','TestCase/inbox',f'--alluredir=./allureReports','--clean-alluredir']) - os.system(f'allure generate ./allureReports -c') - # os.system('allure open ./allureReports') + + # result = subprocess.run(['allure', 'generate', './allureReports', '-o', './allure-report', '--clean']) + # os.system('allure generate ./allureReports -c -o ./allureOutput') finally: print('finally') - # test_env_conn.close_db() + test_env_conn.close_db() + -- GitLab