pytest不使用 conftest.py 传递配置参数并设置全局变量
1. 创建config_handler.py import os import yaml# 当前路径(使用 abspath 方法可通过dos窗口执行) current_path os.path.dirname(os.path.abspath(__file__)) # 上上级目录 ffather_path os.path.abspath(os.path.join(current_path,"../../"))global_config_pat…
2026-03-27