You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_argparse.py trailing spaces within test strings removed by make patchcheck if file is modified #91984
Bug report
There are two strings in test_argparse.py which have lines ending with blank spaces. When the file is modified and make 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 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 \n
This 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.)
Activity
merwok commentedon Apr 27, 2022
Alternative: change argparse to not produce trailing spaces
Appended '\n' to test strings with blank spaces before end of line, i…
gh-91984: Fix trailing spaces in multiline test strings in test_argpa…