starmen1265
|
5debdd6f36
|
test(15-03): add API compatibility tests
- test_existing_api_compatibility: 验证不传参数时使用配置默认值
- test_explicit_false_overrides_config: 验证显式传 False 覆盖配置
- test_migration_path: 验证两种启用语义分段的方式
Task 3 完成:API 调用兼容性验证
所有向后兼容性测试通过(9/9)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-03-23 23:03:40 +08:00 |
|
starmen1265
|
7371c6e8c0
|
test(15-03): add AnalyzeProcessor independence tests
- test_analyze_processor_unaffected_by_config: 验证 AnalyzeProcessor 不受 enable_semantic_segmentation 配置影响
- test_analyze_processor_normal_initialization: 验证 AnalyzeProcessor 正常初始化
- test_analyze_processor_output_unchanged: 验证 AnalyzeProcessor 输出格式未改变
Task 2 完成:AnalyzeProcessor 独立性验证(CONFIG-03)
现有 test_analyze.py 测试全部通过,未被配置变更破坏
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-03-23 23:03:12 +08:00 |
|
starmen1265
|
8577571eda
|
test(15-03): add rule-based segmentation backward compatibility tests
- test_rule_based_segmentation_unchanged: 验证 enable_semantic_segmentation=False 时使用规则分段器
- test_rule_based_no_llm_calls: 验证规则分段不调用 LLM
- test_rule_based_thresholds_unchanged: 验证规则分段阈值(时间/长度)未改变
Task 1 完成:规则分段向后兼容性验证(CONFIG-02)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-03-23 23:02:20 +08:00 |
|
starmen1265
|
1c1c88e2cf
|
test(15-00): add test infrastructure placeholders for Phase 15
创建了测试基础设施,为后续计划提供测试框架。
## 创建的文件
1. **tests/test_processors/test_srt.py** - SRTProcessor 配置集成测试占位符
- TestConfigIntegration 测试类
- 5 个测试占位符(pytest.skip)
2. **tests/test_backward_compat.py** - 向后兼容性测试
- TestBackwardCompatibility 测试类
- 部分测试已实现(来自计划 15-01)
- 部分测试占位符(pytest.skip)
3. **tests/conftest.py** - 添加共享 fixtures
- temp_env_vars fixture:临时环境变量管理
- mock_kbsettings fixture:Mock KBSettings 实例
- 添加 os 模块导入
## 偏离说明
计划要求所有测试都是占位符(pytest.skip),但实际上:
- test_config.py 已由计划 15-01 实现完整测试
- test_backward_compat.py 有部分实现
原因:计划 15-01 在 15-00 之前执行,导致测试不是占位符。
## 验证
- pytest 发现所有新增测试类和测试函数
- 测试文件结构符合项目规范
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-03-23 23:02:12 +08:00 |
|