diff --git a/main.py b/main.py index 81f915bbd61d0aa99bb48d8864bc95fb4a073115..44c436354477b82b5cab88ed715f9209b1238c4e 100644 --- a/main.py +++ b/main.py @@ -1,14 +1,12 @@ import pytest from Utils.webhook_handler import webhook from Utils.sql_handler import test_env_conn -import os if __name__ == '__main__': try: # pytest.main(['-vs',r'C:\Users\rd71\PycharmProjects\willdesk_api_auto\TestCase\inbox\test_06_channel.py',f'--alluredir=./allureReports/json','--clean-alluredir']) - pytest.main(['-vs','./TestCase',f'--html=./report.html']) #allure报告一直生成不了,改用pytest自带报告 - # pytest_run_command = 'pytest ./TestCase -vs -n=3 --reruns=1 --reruns-delay=3 --html=./report.html' - # os.system(pytest_run_command) + pytest.main(['-vs','./TestCase/setting/test_01_emailIntegration.py',f'--html=./report.html']) #allure报告一直生成不了,改用pytest自带报告 + finally: test_env_conn.close_db() #关闭数据库链接