1
0
Files
PPTX/openspec/changes/archive/2026-03-03-run-tests-fix-issues/proposal.md

31 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## Why
项目测试套件当前存在42个失败的测试用例主要分为三类问题测试运行方式错误E2E测试使用`python -m uv run`导致命令执行失败、测试代码本身的缺陷缺失fixture、Mock对象配置不当以及项目代码中的真实bug模板变量替换不完整、验证结果格式化错误。这些失败会影响持续集成流程和代码质量保证必须立即修复。
## What Changes
- 修复E2E测试中的命令执行方式`python -m uv run python`改为正确的`uv run`调用方式
- 添加缺失的测试fixturemock_template_class等
- 修正Mock对象的配置确保返回值正确
- 修复模板系统中变量替换的bug字体变量替换、条件渲染
- 修复验证结果格式化输出(提示信息显示)
- 修复HTML渲染器特殊字符转义问题&字符)
- 修复Presentation尺寸验证防止16:9被解析为数学表达式
- 修复PPTX验证器的文本框检测方式
- 确保所有测试通过,保持代码库的测试覆盖率
## Capabilities
### New Capabilities
本变更不引入新功能。
### Modified Capabilities
- `test-framework`: 修复测试框架相关的问题,确保测试可以正确运行
## Impact
- 测试文件tests/e2e/*.py, tests/unit/test_*.py, tests/integration/*.py
- 核心模块core/template.py模板变量替换、core/presentation.py尺寸验证
- 验证模块validators/result.py结果格式化
- 渲染模块renderers/html_renderer.pyHTML转义