pytest.ini 456 B

123456789101112131415161718192021222324
  1. [pytest]
  2. # pytest 配置文件
  3. # 测试文件匹配模式
  4. python_files = test_*.py *_test.py
  5. python_classes = Test*
  6. python_functions = test_*
  7. # 标记定义
  8. markers =
  9. asyncio: 标记异步测试
  10. integration: 标记集成测试(需要实际API服务)
  11. slow: 标记慢速测试
  12. unit: 标记单元测试
  13. # 输出选项
  14. addopts =
  15. -v
  16. --strict-markers
  17. --tb=short
  18. --disable-warnings
  19. # 异步测试配置
  20. asyncio_mode = auto