pytest.ini 812 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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
  21. # 日志配置
  22. log_cli = false
  23. log_cli_level = INFO
  24. log_cli_format = %(asctime)s [%(levelname)8s] %(message)s
  25. log_cli_date_format = %Y-%m-%d %H:%M:%S
  26. # 覆盖率配置
  27. [coverage:run]
  28. source = core.construction_review.component.reviewers
  29. omit =
  30. */tests/*
  31. */test_*.py
  32. [coverage:report]
  33. precision = 2
  34. show_missing = True
  35. skip_covered = False