Repository navigation
test(e2e): 固定解释器的运行测试按解析链接后的路径比较 sys.prefix - #15
Merged
Merged
Conversation
Homebrew 的框架版 Python 从 Cellar 目录启动时,sys.prefix 仍经过 /opt/homebrew/opt 链接打印。测试固定的是解析过链接的 Cellar 路径, 直接比较字符串会失败,主分支 CI 在 0.8.9 兼容子集上一直是红的。 现在逐行解析链接后再比较。
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.
改动
只改端到端测试,插件代码和清单都没动,所以不升版本。
TestPythonSupportPluginRunCurrentFilePinnedInterpreter固定的解释器是测试解析过链接的安装目录,然后检查程序打印的sys.prefix里有没有这个目录。比较时只看字符串。macOS runner 上 PATH 里的
python3是 Homebrew 的框架版 Python。它从 Cellar 目录启动,但sys.prefix仍然经过/opt/homebrew/opt链接打印,两者字符串对不上。从 #13 合入起,主分支 CI 的 host-e2e 一直在 0.8.9 兼容子集这一步失败(run 45113894536):现在新增
printsPrefix:把输出逐行解析链接,再和解析链接后的期望目录比较。另外两个运行测试(项目.venv、覆盖路径)也走同一个检查,它们的期望目录本来就是解析过链接的临时目录,结果不变。验证
PYTEST_PYTHON用 uv 的独立 3.12.13:5 个测试全部通过。bin/python3的环境,Homebrew 那种情况要靠这个 PR 的 CI 确认。合入后在主分支打
v1.1.0发布。