[pytest] # pytest配置文件 # 测试文件命名规则 python_files = test_*.py *_test.py # 测试类命名规则 python_classes = Test* # 测试函数命名规则 python_functions = test_* # 添加命令行选项 addopts = # 详细输出 -v # 显示断言的详细信息 --tb=short # 显示测试结果摘要 -rA # 显示进度 --color=yes # 添加src到Python路径 --import-mode=append # 测试路径 testpaths = tests # 标记慢速测试 markers = slow: 慢速测试 performance: 性能测试 boundary: 边界值测试 equivalence: 等价类测试 decision_table: 判定表法测试 cause_effect: 因果图法测试 # 忽略警告 filterwarnings = ignore::UserWarning ignore::DeprecationWarning # 测试用例收集超时 collect_timeout = 10.0 # Python路径 pythonpath = src