fix(test): 消掉 Windows cmdline 用例里的 SyntaxWarning - #41
Merged
Conversation
#38 带进来的两条断言里 `"C:\Python\python.exe"` / `"C:\Windows\explorer.exe"` 是非法转义序列(`\P` `\W`),Python 3.12+ 每次收集测试都报 SyntaxWarning, 未来版本会直接变成 SyntaxError。断言内容不变。
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughCorrects backslash escaping in two Windows daemon-identity test fixtures so mocked subprocess output matches the expected command and executable-path strings. ChangesWindows daemon identity tests
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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.
#38 合入时带进来的两条断言用了非法转义序列:
"C:\Python\python.exe"→\P"C:\Windows\explorer.exe"→\WPython 3.12+ 每次收集测试都会打 SyntaxWarning,未来版本里会直接变 SyntaxError。改成 raw string / 显式转义,断言内容和覆盖不变。
验证:
compile()扫全量 src+tests,syntax warnings 从 2 降到 0;tests/test_daemon.py65 passed。Summary by CodeRabbit