Repository navigation
修复示例运行器检查单篇 Markdown 时漏跑代码块的问题 - #325
Open
petergrammy wants to merge 1 commit into
Open
petergrammy wants to merge 1 commit into
petergrammy wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
单独检查改过的章节时,
python tools/example_runner.py Article/PythonBasis/python2/Variable.md会报告「总计 0 块」并返回成功。这个文件有 6 个 Python 示例。运行器对文件路径也调用了rglob("*.md"),只会枚举目录中的文件。改动后,传入 Markdown 文件会执行其中的代码块,传入目录仍按原顺序递归扫描。拼错的路径或非 Markdown 文件会得到包含路径的参数错误。新增回归测试验证了单文件中的失败示例会使进程返回 1。
在 conda base 的 Python 3.12.7 下运行了工具测试(12 项)和学习记录示例测试(10 项)。单独运行变量章节执行了 6 块,同时传入第一段程序和变量两篇文章执行了 8 块,均通过。
本次改动和本地验证使用了 OpenAI Codex。