import pytest from Utils.sql_handler import test_env_conn 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/billing',f'--html=./report.html']) #allure报告一直生成不了,改用pytest自带报告 finally: test_env_conn.close_db() #关闭数据库链接