67157dff34
- 单元测试: Database 和 Service 层 - 集成测试: MCP 工具端到端测试 - 测试配置: pytest.ini 和覆盖率设置 - 测试文档: tests/README.md 测试覆盖: - 数据库 CRUD 操作 - FTS5 搜索和验证 - 缓存服务 (LRU + TTL) - 解析服务 (frontmatter, wikilinks) - 索引服务 (增量更新, 重建) - MCP 工具集成测试 Co-Authored-By: Claude Dev <noreply@anthropic.com>
33 lines
480 B
INI
33 lines
480 B
INI
[pytest]
|
|
# Pytest 配置文件
|
|
|
|
# 测试发现
|
|
testpaths = tests
|
|
|
|
# 输出选项
|
|
addopts =
|
|
-v
|
|
--strict-markers
|
|
--tb=short
|
|
--cov-report=term-missing
|
|
--cov-report=html
|
|
|
|
# 标记定义
|
|
markers =
|
|
unit: 单元测试
|
|
integration: 集成测试
|
|
e2e: 端到端测试
|
|
slow: 慢速测试
|
|
|
|
# 覆盖率配置
|
|
[coverage:run]
|
|
source = mcp_server
|
|
omit =
|
|
*/tests/*
|
|
*/__init__.py
|
|
|
|
[coverage:report]
|
|
precision = 2
|
|
show_missing = true
|
|
skip_covered = false
|