Files
2026-09-12 18:24:41 +08:00

22 lines
722 B
INI

# +======================================================================
# | 模块: Pytest 测试配置
# | 说明: 测试发现路径、标记、默认行为配置
# +======================================================================
[pytest]
# 最低版本要求
minversion = 7.0
# 默认测试参数:显示详细信息、严格标记、跳过集成测试
addopts = -ra --strict-markers -m "not integration"
# 测试发现路径
testpaths = tests
# 源码路径(用于导入测试模块)
pythonpath = src
# 自定义测试标记
markers =
contract: 契约快照测试(路由/权限串/表名),守护前端与数据契约
integration: 需要真实 MySQL/Redis 的集成测试,默认跳过