Files
Auto-Finance/tests
wandering 44496a54e6 fix: 补充 __init__.py 导出符号,修复测试导入错误
- src/core/extraction/__init__.py: 导出 _image_to_base64
- src/core/matching/__init__.py: 导出所有内部函数(_build_invoice_summary, _build_payment_records, _invoices_to_records, _match, _match_by_filename, _match_one_to_many, _match_one_to_one, _relative_tolerance, _safe_float)
- src/infra/documents/__init__.py: 导出 INVOICE_LEVEL_COLUMNS, PAYMENT_RECORD_COLUMNS
- tests/test_extractor.py: 修正 monkeypatch 路径为模块级引用
2026-07-02 18:51:59 +08:00
..
2026-06-09 16:25:20 +08:00
2026-06-11 19:22:34 +08:00
2026-06-09 16:25:20 +08:00

last_reviewed
last_reviewed
2026-06-11

tests — 单元测试目录

存放项目单元测试,使用 pytest 运行。

测试清单

文件 覆盖范围
test_config.py 配置加载模块
test_extractor.py 发票提取编排:空目录、提取失败、正常流程、分类结果、申请单分离、支付匹配
test_invoice.py 发票分类、CSV 读写
test_llm_extractor.py LLM 信息提取
test_matcher.py 发票与支付记录匹配

运行方式

uv run pytest tests/