[issue36014] test_help_with_metavar broken
wabba
report at bugs.python.org
Sun Feb 17 00:18:09 EST 2019
wabba <riverfullofgood at hotmail.com> added the comment:
Ah sorry, forgot the traceback and command:
Command: python3 Lib/test/test_argparse.py
test (__main__.TestActionRegistration) ... ok
test_failures_many_groups_listargs (__main__.TestActionUserDefined) ... ok
test_failures_many_groups_sysargs (__main__.TestActionUserDefined) ... ok
...
...
======================================================================
FAIL: test_help_with_metavar (__main__.TestWrappingMetavar)
----------------------------------------------------------------------
Traceback (most recent call last):
File "Lib/test/test_argparse.py", line 5152, in test_help_with_metavar
'''))
AssertionError: 'usag[55 chars]_name [-h] [--proxy <http[s]://example:1234>]\[113 chars]4>\n' != 'usag[55 chars]_name\n [-h] [--proxy <http[s]://example[121 chars]4>\n'
- usage: this_is_spammy_prog_with_a_long_name_sorry_about_the_name [-h] [--proxy <http[s]://example:1234>]
? ----------------------------------------
+ usage: this_is_spammy_prog_with_a_long_name_sorry_about_the_name
+ [-h] [--proxy <http[s]://example:1234>]
optional arguments:
-h, --help show this help message and exit
--proxy <http[s]://example:1234>
----------------------------------------------------------------------
Ran 1574 tests in 4.558s
FAILED (failures=1)
Traceback (most recent call last):
File "Lib/test/test_argparse.py", line 5164, in <module>
test_main()
File "Lib/test/test_argparse.py", line 5156, in test_main
support.run_unittest(__name__)
File "/usr/local/lib/python3.7/test/support/__init__.py", line 1991, in run_unittest
_run_suite(suite)
File "/usr/local/lib/python3.7/test/support/__init__.py", line 1910, in _run_suite
raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
File "Lib/test/test_argparse.py", line 5152, in test_help_with_metavar
'''))
AssertionError: 'usag[55 chars]_name [-h] [--proxy <http[s]://example:1234>]\[113 chars]4>\n' != 'usag[55 chars]_name\n [-h] [--proxy <http[s]://example[121 chars]4>\n'
- usage: this_is_spammy_prog_with_a_long_name_sorry_about_the_name [-h] [--proxy <http[s]://example:1234>]
? ----------------------------------------
+ usage: this_is_spammy_prog_with_a_long_name_sorry_about_the_name
+ [-h] [--proxy <http[s]://example:1234>]
optional arguments:
-h, --help show this help message and exit
--proxy <http[s]://example:1234>
I first encountered this error when running "make test" when installing python 3.7.2, then tried running this test manually with the command above.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36014>
_______________________________________
More information about the Python-bugs-list
mailing list