Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Description
Bug report
There are two strings intest_argparse.py which have lines ending with blank spaces. When the file is modified andmake patchcheck run, it removes these trailing spaces from within the strings. This causes the test cases that these strings are a part of to fail. The strings in question are:
cpython/Lib/test/test_argparse.py
Line 2268 inb733708
| foo |
cpython/Lib/test/test_argparse.py
Line 2285 inb733708
| {} |
This issue is further discussed over on#91841
Test Environment
CPython versions tested on:
-3,11(pulled latest main branch from python/cpython)
Operating system and architecture:
-Ubuntu LTS (20.04), 64-Bit
Proposed Fix
In both of these cases the lines are followed by a newline. We could append '\n' to the lines and remove the next line. As follows:
foo \nThis would solve the issue since the last character will no longer be a blank space. The strings would be essentially the same as before, thus the test cases will not be affected. (Confirmed this locally.)