1
0

fix: 修复测试问题,提升测试通过率

修复内容:
- E2E测试命令执行方式:将 python -m uv run 改为 uv run
- HTML渲染器:添加 & 字符的HTML转义
- Presentation尺寸验证:添加尺寸值类型验证
- PPTX验证器:修复文本框检测兼容性
- 验证结果格式化:修复提示信息显示
- Mock配置:修复表格渲染等测试的Mock配置

测试结果:
- 修复前: 264 通过, 42 失败, 1 错误
- 修复后: 297 通过, 9 失败, 1 错误

剩余9个失败为待实现的功能增强(验证器模板变量验证)
This commit is contained in:
2026-03-03 00:42:39 +08:00
parent f273cef195
commit c73bd0fedd
12 changed files with 318 additions and 401 deletions

View File

@@ -15,13 +15,10 @@ class TestCheckCmd:
def run_check(self, *args):
"""辅助函数:运行 check 命令"""
cmd = [sys.executable, "-m", "uv", "run", "python", "yaml2pptx.py", "check"]
cmd = ["uv", "run", "python", "yaml2pptx.py", "check"]
cmd.extend(args)
result = subprocess.run(
cmd,
capture_output=True,
text=True,
cwd=Path(__file__).parent.parent.parent
cmd, capture_output=True, text=True, cwd=Path(__file__).parent.parent.parent
)
return result