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 bethard, terry.reedy
Date 2011-04-22.03:26:08
SpamBayes Score 1.1580593e-08
Marked as misclassified No
Message-id <1303442771.01.0.0867760921949.issue11906@psf.upfronthosting.co.za>
In-reply-to
Content
(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>python -m test -v test_argparse
C:\Programs\Python32>python -c "from test import test_argparse as t; t.test_main()"
Ran 1536 tests in 6.188s
OK

but interactively (command window interpreter or IDLE shell, 3.2 or 2.7)
>>> from test import test_argparse as t; t.test_main()

gives two failures related to extra spaces in usage string (I added a couple of newlines for clarity). I have no idea if problem is with argparse, test_argparse, regrtest, unittest, or interactive versus batch mode.

======================================================================
FAIL: test_groups_parents (test.test_argparse.TestParentParsers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Programs\Python32\lib\test\test_argparse.py", line 2217, in test_groups_parents
    '''.format(self.main_program)))
  File "C:\Programs\Python32\lib\test\test_argparse.py", line 29, in assertEqual
    super(TestCase, self).assertEqual(obj1, obj2)
AssertionError:
'usage: [-h] [-w W] [-x X] [-y Y | -z Z]\n\noptional arguments:\n  -h, --help  s [truncated]... != 
'usage:  [-h] [-w W] [-x X] [-y Y | -z Z]\n\noptional arguments:\n  -h, --help   [truncated]...
- usage: [-h] [-w W] [-x X] [-y Y | -z Z]
+ usage:  [-h] [-w W] [-x X] [-y Y | -z Z]
?        +
  
  optional arguments:
    -h, --help  show this help message and exit
    -y Y
    -z Z
  
  g:
    gd
  
    -w W
    -x X


======================================================================
FAIL: test_parent_help (test.test_argparse.TestParentParsers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Programs\Python32\lib\test\test_argparse.py", line 2188, in test_parent_help
    '''.format(self.main_program)))
  File "C:\Programs\Python32\lib\test\test_argparse.py", line 29, in assertEqual
    super(TestCase, self).assertEqual(obj1, obj2)
AssertionError:
'usage: [-h] [-b B] [--d D] [--w W] [-y Y] a z\n\npositional arguments:\n  a\n   [truncated]... != 
'usage:  [-h] [-b B] [--d D] [--w W] [-y Y] a z\n\npositional arguments:\n  a\n  [truncated]...
- usage: [-h] [-b B] [--d D] [--w W] [-y Y] a z
+ usage:  [-h] [-b B] [--d D] [--w W] [-y Y] a z
?        +
  
  positional arguments:
    a
    z
  
  optional arguments:
    -h, --help  show this help message and exit
    -b B
    --w W
  
  c:
    --d D
  
  x:
    -y Y


----------------------------------------------------------------------
Ran 1536 tests in 29.438s

FAILED (failures=2)
Traceback (most recent call last):
  File "<pyshell#11>", line 1, in <module>
    from test import test_argparse as t; t.test_main()
  File "C:\Programs\Python32\lib\test\test_argparse.py", line 4423, in test_main
    support.run_unittest(__name__)
  File "C:\Programs\Python32\lib\test\support.py", line 1145, in run_unittest
    _run_suite(suite)
  File "C:\Programs\Python32\lib\test\support.py", line 1128, in _run_suite
    raise TestFailed(err)
test.support.TestFailed: multiple errors occurred
History
Date User Action Args
2011-04-22 03:26:11terry.reedysetrecipients: + terry.reedy, bethard
2011-04-22 03:26:11terry.reedysetmessageid: <1303442771.01.0.0867760921949.issue11906@psf.upfronthosting.co.za>
2011-04-22 03:26:10terry.reedylinkissue11906 messages
2011-04-22 03:26:08terry.reedycreate