python 工程中怎么解决路径的问题
是写绝对路径好还是写相对路径好。答案是都不好!
上骚操作:
import os #读取路径的值 file_path =os.path.split(os.path.split(os.path.realpath(__file__))[0])[0] test_case_path = os.path.join(file_path,'test_data','test_data.xlsx') test_report_path = os.path.join(file_path,'test_result','html_report','test_api.html') # print(test_report_path)



