Terry J. Reedy <[email protected]> added the comment:
Ahem. Interactive mode is an approved method of running Python code, along with
batch mode. The core interpreter and stdlib modules should run correctly in
both modes. So the entire test suite should pass in both modes too. If the
tests are written correctly, failure would indicate a bug in the tested
component.
That aside, the doc for test/ does not contain 'recommended' and does not
discuss running a single test. What I did is the easiest way on Windows.
In this case, following Andreas' remark, the bug is in the test, not the
module, in that it miscalculates the expected output in the corner case of a
null program name. At lines 2172 and 2205 in the 3.2.0 version of
test_argparse.py, changing
'''usage: {} ...
...
'''.format(self.main_program)
to
prog = self.main_program
...
'''usage: {}{}...
...
'''.format(prog, ' ' if prog else '')
fixes the problem.
----------
keywords: +easy
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11906>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com