summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_argparse.py
Commit message (Collapse)AuthorAgeFilesLines
* fix instances of consecutive articles (closes #23221)Benjamin Peterson2015-01-131-1/+1
| | | | Patch by Karan Goel.
* #9351: set_defaults on subparser is no longer ignored if set on parent.R David Murray2014-10-171-0/+7
| | | | | | | | Before, if a default was set on the parent parser, any default for that variable set via set_defaults on a subparser would be ignored. Now the subparser set_defaults is honored. Patch by Jyrki Pullianinen.
* #11955: show the list of args in case of error in test_argparse.Ezio Melotti2014-08-041-2/+2
|
* Issue #21481: Teach argparse equality tests to return NotImplemented when ↵Raymond Hettinger2014-05-261-0/+6
| | | | comparing to unknown types.
* make temporary read-only files writable, so rmtree can remove them (#21128)Benjamin Peterson2014-04-041-0/+3
|
* Issue #13107: argparse and optparse no longer raises an exception when outputSerhiy Storchaka2014-01-091-0/+54
|\ | | | | | | | | a help on environment with too small COLUMNS. Based on patch by Elazar Gershuni.
| * Issue #13107: argparse and optparse no longer raises an exception when outputSerhiy Storchaka2014-01-091-0/+54
| | | | | | | | | | a help on environment with too small COLUMNS. Based on patch by Elazar Gershuni.
* | Issue #18920: argparse's default version action (for -v, --version) shouldEli Bendersky2013-09-061-2/+2
| | | | | | | | | | | | output to stdout, matching the 'python -v' Reported by Wolfgang Maier
* | #11175: argparse.FileType now accepts encoding and errors arguments.Petri Lehtinen2012-12-151-0/+32
|/ | | | Patch by Lucas Maystre.
* Merge 3.2 fix updates and tests for issue #15906.Barry Warsaw2012-09-121-4/+27
|\
| * A follow up for issue #15906: change the test for calling the type conversionBarry Warsaw2012-09-121-4/+27
| | | | | | | | | | | | | | | | on the action's default, reverting it back to previous behavior. Conversion is only done on string defaults. Add a test for this and another test that ensures such type conversions are only called once.
* | - Issue #15906: Fix a regression in argparse caused by the preceding change,Barry Warsaw2012-09-121-0/+10
|\ \ | |/ | | | | when action='append', type='str' and default=[].
| * - Issue #15906: Fix a regression in argparse caused by the preceding change,Barry Warsaw2012-09-121-0/+10
| | | | | | | | when action='append', type='str' and default=[].
* | merge #15847: allow args to be a tuple in parse_argsR David Murray2012-09-081-0/+18
|\ \ | |/ | | | | | | | | | | | | This fixes a regression introduced by the fix for issue #13922. Although args is not documented as being allowed to be a tuple, previously this worked and so naturally there are programs in the field that depend on it. Patch by Zbyszek Jędrzejewski-Szmek.
| * #15847: allow args to be a tuple in parse_argsR David Murray2012-09-081-0/+18
| | | | | | | | | | | | | | | | This fixes a regression introduced by the fix for issue #13922. Although args is not documented as being allowed to be a tuple, previously this worked and so naturally there are programs in the field that depend on it. Patch by Zbyszek Jędrzejewski-Szmek.
* | Merge #12776,#11839: call argparse type function only once.R David Murray2012-09-011-0/+48
|\ \ | |/ | | | | | | | | | | | | | | Before, the type function was called twice in the case where the default was specified and the argument was given as well. This was especially problematic for the FileType type, as a default file would always be opened, even if a file argument was specified on the command line. Patch by Arnaud Fontaine, with additional test by Mike Meyer.
| * #12776,#11839: call argparse type function only once.R David Murray2012-09-011-0/+48
| | | | | | | | | | | | | | | | | | Before, the type function was called twice in the case where the default was specified and the argument was given as well. This was especially problematic for the FileType type, as a default file would always be opened, even if a file argument was specified on the command line. Patch by Arnaud Fontaine, with additional test by Mike Meyer.
* | Merge #13922: argparse no longer incorrectly strips '--' after the first one.R David Murray2012-07-221-12/+26
|\ \ | |/ | | | | Patch by Jeff Knupp.
| * #13922: argparse no longer incorrectly strips '--' after the first one.R David Murray2012-07-221-12/+26
| | | | | | | | Patch by Jeff Knupp.
* | Merge #12353: argparse now correctly handles null argument values.R David Murray2012-07-221-0/+1
|\ \ | |/ | | | | Patch by Torsten Landschoff.
| * #12353: argparse now correctly handles null argument values.R David Murray2012-07-221-0/+1
| | | | | | | | Patch by Torsten Landschoff.
* | Issue #13248: argparse: Remove obsolete argument "version" of ArgumentParser.Florent Xicluna2012-07-071-43/+36
| |
* | Merge with 3.2Terry Jan Reedy2012-01-091-4/+6
|\ \ | |/
| * #11906 Make test_argparse work interactively by removing extra spaceTerry Jan Reedy2012-01-091-4/+6
| | | | | | | | in comparison string that argparse does not add when program name is blank.
* | (Merge 3.2) Close #13401: Skip TestFileTypeW of test_argparse if the current ↵Victor Stinner2011-11-201-0/+2
|\ \ | |/ | | | | | | | | user is root Patch written by Arfrever Frehtes Taifersar Arahesis.
| * Close #13401: Skip TestFileTypeW of test_argparse if the current user is rootVictor Stinner2011-11-201-0/+2
| | | | | | | | Patch written by Arfrever Frehtes Taifersar Arahesis.
* | #10424: argument names are now included in the missing argument messageR David Murray2011-06-091-0/+61
| | | | | | | | Fix and initial test patch by Michele Orrù.
* | Issue #9347: Fix formatting for tuples in argparse type= error messages.Steven Bethard2011-04-041-0/+2
|\ \ | |/
| * Issue #9347: Fix formatting for tuples in argparse type= error messages.Steven Bethard2011-04-031-0/+2
| |
* | Issue #9026: Fix order of argparse sub-commands in help messages. (Merged ↵Steven Bethard2011-03-271-3/+80
|\ \ | |/ | | | | from 3.2.)
| * Issue #9026: Fix order of argparse sub-commands in help messages.Steven Bethard2011-03-271-3/+80
| |
* | Issue #9348: Raise an early error if argparse nargs and metavar don't match. ↵Steven Bethard2011-03-261-0/+171
|\ \ | |/ | | | | (Merge from 3.2.)
| * Issue #9348: Raise an early error if argparse nargs and metavar don't match.Steven Bethard2011-03-261-0/+171
| |
* | Issue #11174: Add argparse.MetavarTypeHelpFormatter, which uses type namesSteven Bethard2011-03-261-0/+31
| | | | | | | | for the names of optional and positional arguments in help messages.
* | Normalize the encoding names for Latin-1 and UTF-8 toMarc-André Lemburg2011-02-251-1/+1
|/ | | | | | | | | | 'latin-1' and 'utf-8'. These are optimized in the Python Unicode implementation to result in more direct processing, bypassing the codec registry. Also see issue11303.
* #10680: fix mutually exclusive arguments in argument groups.Georg Brandl2011-01-301-0/+40
|
* Issue #9509: make argarse properly handle IOErrors raised by ↵Steven Bethard2011-01-241-9/+15
| | | | argparse.FileType. Approved by Georg in the tracker.
* Add subparser aliases for argparse. Resolves issue 9324. Approved by Georg ↵Steven Bethard2010-12-181-2/+49
| | | | for beta2 on the tracker.
* Use proper plural forms in argparse (#4391)Éric Araujo2010-12-041-1/+1
|
* #9424: Replace deprecated assert* methods in the Python test suite.Ezio Melotti2010-11-201-9/+9
|
* Make test class name unique so that both test classes run.R. David Murray2010-11-201-1/+1
|
* Fix bug 9340 - argparse parse_known_args didn't work with subparsersSteven Bethard2010-11-021-0/+22
|
* Fix for issue 9355 where with multiple mutually exclusive arguments, some ↵Steven Bethard2010-11-011-0/+19
| | | | brackets were being lost in the usage messages
* Fix bug 9352 where characters were being lost in parsing some short optionsSteven Bethard2010-11-011-0/+24
|
* Get argparse.__all__ back up to date (issue 9353)Steven Bethard2010-11-011-0/+10
|
* Unset COLUMNS for test_argparse (and restore afterwards) (issue 9553)Steven Bethard2010-11-011-0/+9
|
* Explicitly close some files (from issue #10093)Antoine Pitrou2010-10-141-1/+2
|
* #9444: use first of prefix_chars for help opt instead of raising errorR. David Murray2010-08-031-7/+72
| | | | | | | | | | | An argparse option parser created with a prefix_chars that did not include a '-' would happily add -h and --help options, and then throw an error when it tried to format the help because the - was an invalid prefix character. This patch makes it use the first character of prefix_chars as the character for the help options if and only if '-' is not one of the valid prefix_chars. Fix by Theodore Turocy, unit tests by Catherine Devlin.
* Merged revisions 81492 via svnmerge fromSteven Bethard2010-05-241-0/+19
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81492 | steven.bethard | 2010-05-23 20:45:26 -0700 (Sun, 23 May 2010) | 1 line Fix default value for version help. Approved by Benjamin on python-dev: http://mail.python.org/pipermail/python-dev/2010-May/100231.html ........
* Merged revisions ↵Benjamin Peterson2010-04-111-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 79464,79471,79623,79626,79630,79632,79643,79648-79649,79679,79685,79711,79761,79774,79777,79792-79794,79877,79898-79900 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79464 | michael.foord | 2010-03-27 07:55:19 -0500 (Sat, 27 Mar 2010) | 1 line A fix for running unittest tests on platforms without the audioop module (e.g. jython and IronPython) ........ r79471 | michael.foord | 2010-03-27 14:10:11 -0500 (Sat, 27 Mar 2010) | 4 lines Addition of delta keyword argument to unittest.TestCase.assertAlmostEquals and assertNotAlmostEquals This allows the comparison of objects by specifying a maximum difference; this includes the comparing of non-numeric objects that don't support rounding. ........ r79623 | michael.foord | 2010-04-02 16:42:47 -0500 (Fri, 02 Apr 2010) | 1 line Addition of -b command line option to unittest for buffering stdout and stderr during test runs. ........ r79626 | michael.foord | 2010-04-02 17:08:29 -0500 (Fri, 02 Apr 2010) | 1 line TestResult stores original sys.stdout and tests no longer use sys.__stdout__ (etc) in tests for unittest -b command line option ........ r79630 | michael.foord | 2010-04-02 17:30:56 -0500 (Fri, 02 Apr 2010) | 1 line unittest tests no longer replace the sys.stdout put in place by regrtest ........ r79632 | michael.foord | 2010-04-02 17:55:59 -0500 (Fri, 02 Apr 2010) | 1 line Issue #8038: Addition of unittest.TestCase.assertNotRegexpMatches ........ r79643 | michael.foord | 2010-04-02 20:15:21 -0500 (Fri, 02 Apr 2010) | 1 line Support dotted module names for test discovery paths in unittest. Issue 8038. ........ r79648 | michael.foord | 2010-04-02 21:21:39 -0500 (Fri, 02 Apr 2010) | 1 line Cross platform unittest.TestResult newline handling when buffering stdout / stderr. ........ r79649 | michael.foord | 2010-04-02 21:33:55 -0500 (Fri, 02 Apr 2010) | 1 line Another attempt at a fix for unittest.test.test_result for windows line endings ........ r79679 | michael.foord | 2010-04-03 09:52:18 -0500 (Sat, 03 Apr 2010) | 1 line Adding -b command line option to the unittest usage message. ........ r79685 | michael.foord | 2010-04-03 10:20:00 -0500 (Sat, 03 Apr 2010) | 1 line Minor tweak to unittest command line usage message ........ r79711 | michael.foord | 2010-04-03 12:03:11 -0500 (Sat, 03 Apr 2010) | 1 line Documenting new features in unittest ........ r79761 | michael.foord | 2010-04-04 17:41:54 -0500 (Sun, 04 Apr 2010) | 1 line unittest documentation formatting changes ........ r79774 | michael.foord | 2010-04-04 18:28:44 -0500 (Sun, 04 Apr 2010) | 1 line Adding documentation for new unittest.main() parameters ........ r79777 | michael.foord | 2010-04-04 19:39:50 -0500 (Sun, 04 Apr 2010) | 1 line Document signal handling functions in unittest.rst ........ r79792 | michael.foord | 2010-04-05 05:26:26 -0500 (Mon, 05 Apr 2010) | 1 line Documentation fixes for unittest ........ r79793 | michael.foord | 2010-04-05 05:28:27 -0500 (Mon, 05 Apr 2010) | 1 line Furterh documentation fix for unittest.rst ........ r79794 | michael.foord | 2010-04-05 05:30:14 -0500 (Mon, 05 Apr 2010) | 1 line Further documentation fix for unittest.rst ........ r79877 | michael.foord | 2010-04-06 18:18:16 -0500 (Tue, 06 Apr 2010) | 1 line Fix module directory finding logic for dotted paths in unittest test discovery. ........ r79898 | michael.foord | 2010-04-07 18:04:22 -0500 (Wed, 07 Apr 2010) | 1 line unittest.result.TestResult does not create its buffers until they're used. It uses StringIO not cStringIO. Issue 8333. ........ r79899 | michael.foord | 2010-04-07 19:04:24 -0500 (Wed, 07 Apr 2010) | 1 line Switch regrtest to use StringIO instead of cStringIO for test_multiprocessing on Windows. Issue 8333. ........ r79900 | michael.foord | 2010-04-07 23:33:20 -0500 (Wed, 07 Apr 2010) | 1 line Correction of unittest documentation typos and omissions ........