This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Trundle, bethard, eric.araujo, michael.foord, terry.reedy
Date 2011-05-27.16:58:41
SpamBayes Score 8.970602e-14
Marked as misclassified No
Message-id <1306515521.83.0.69520749353.issue11906@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-05-27 16:58:41terry.reedysetrecipients: + terry.reedy, bethard, eric.araujo, michael.foord, Trundle
2011-05-27 16:58:41terry.reedysetmessageid: <1306515521.83.0.69520749353.issue11906@psf.upfronthosting.co.za>
2011-05-27 16:58:41terry.reedylinkissue11906 messages
2011-05-27 16:58:41terry.reedycreate