[issue11906] Test_argparse failure but only in interactive mode

2011-04-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks for the diagnosis. I am glad it is something simple. -- ___ Python tracker ___ ___ Python-bu

[issue11906] Test_argparse failure but only in interactive mode

2011-04-22 Thread Andreas Stührk
Andreas Stührk added the comment: That happens because argparse uses `os.basename(sys.argv[0])` (per default) as program name, but `sys.argv[0]` is usually a string of length 0 at interactive sessions. The tests use ``"usage: {} ...".format(program_name)`` (note that there will be two spaces

[issue11906] Test_argparse failure but only in interactive mode

2011-04-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: If I put the same line I ran interactively in a file and run it from test import test_argparse as t; t.test_main() all tests pass. So it is specifically a problem from the interactive prompt. -- nosy: +michael.foord __

[issue11906] Test_argparse failure but only in interactive mode

2011-04-22 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue11906] Test_argparse failure but only in interactive mode

2011-04-21 Thread Terry J. Reedy
New submission from Terry J. Reedy : (3.1 not checked because it seems not to have test_argparse) Python 2.7 or 3.2, WinXP these pass: C:\Programs\Python27>python -m test.regrtest test_argparse C:\Programs\Python32>python -m test test_argparse [1/1] test_argparse 1 test OK. C:\Programs\Python32>