Fix Windows path regex escaping in MainModuleTest.testArgPassing - #679
Fix Windows path regex escaping in MainModuleTest.testArgPassing#679Ankush432-cloud wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Thanks @lucassouzaalff-lang for working on the I had actually noticed the same I also noticed that #695 currently has the Of course, if you’re planning to continue with #695, no worries at all — I’ll leave the fix with you. I just wanted to ask because I had already been investigating the same issue and would be happy to take it forward if needed. Also, @MohammedAlkindi, thank you for identifying and documenting these Windows-specific issues in #693 and for pointing out that #679 addresses the |
|
Verified on Windows 11 Home (build 26200), Python 3.13.13 and 3.14.7. The build job has not run on this PR either, so |
|
@MohammedAlkindi @dbieber Since the Windows-specific failure is confirmed and the current CI matrix doesn't include Windows, would you recommend keeping this PR as a separate fix, or is there anything else you'd like me to add/change before it can be considered for merging? |
|
Separate is right. The two failures are independent: this PR fixes Nothing I would change in the diff itself. Whether a |
assertOutputMatches() interprets its expected output as a regular expression. On Windows, os.path.join() returns paths with backslashes, which can be interpreted as invalid regex escape sequences (e.g. \p). Escape the expected path with re.escape() before passing it to assertOutputMatches(), making the test portable across platforms.