summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_optparse.py
Commit message (Collapse)AuthorAgeFilesLines
* #1704474: mark refleak test as specific to CPythonAndrew Kuchling2014-04-151-0/+1
| | | | Patch by Christian Hudon.
* Issue #13107: argparse and optparse no longer raises an exception when outputSerhiy Storchaka2014-01-091-0/+35
| | | | | a help on environment with too small COLUMNS. Based on patch by Elazar Gershuni.
* #9161: Fix test to use standard optparse test pattern (what was I thinking?)R David Murray2012-08-141-6/+6
|
* #9161: add test for the bug fixed by r82581.R David Murray2012-08-141-0/+7
| | | | Patch by Michael Johnson.
* Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-5/+5
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
* Merged revisions 83352,83356-83358,83362,83366,83368-83369 via svnmerge fromGeorg Brandl2010-08-011-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83352 | georg.brandl | 2010-07-31 20:11:07 +0200 (Sa, 31 Jul 2010) | 1 line #9440: Remove borderline test case that fails based on unpredictable conditions such as compiler flags. ........ r83356 | georg.brandl | 2010-07-31 21:29:15 +0200 (Sa, 31 Jul 2010) | 1 line Remove trailing whitespace. ........ r83357 | georg.brandl | 2010-07-31 21:59:55 +0200 (Sa, 31 Jul 2010) | 1 line #5778: document that sys.version can contain a newline. ........ r83358 | georg.brandl | 2010-07-31 22:05:31 +0200 (Sa, 31 Jul 2010) | 1 line #9442: do not document a specific format for sys.version; rather refer to version_info and the platform module. ........ r83362 | georg.brandl | 2010-07-31 23:12:15 +0200 (Sa, 31 Jul 2010) | 1 line #8910: add a file explaining why Lib/test/data is there. ........ r83366 | georg.brandl | 2010-07-31 23:26:40 +0200 (Sa, 31 Jul 2010) | 1 line There always is a False and True now. ........ r83368 | georg.brandl | 2010-07-31 23:40:15 +0200 (Sa, 31 Jul 2010) | 1 line #7909: the prefixes \\.\ and \\?\ indicate special Windows paths, do not try to manipulate them. See http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx for details. ........ r83369 | georg.brandl | 2010-07-31 23:41:42 +0200 (Sa, 31 Jul 2010) | 1 line Fix "Berkeley" name. ........
* Fix indentation in recently added test.R. David Murray2010-06-261-1/+1
|
* #4640: add a test to optparse that proves issue is invalid.R. David Murray2010-06-261-0/+5
|
* remove shebang line from non-executable testBenjamin Peterson2010-03-111-2/+0
|
* normalize shebang lines to #!/usr/bin/env pythonBenjamin Peterson2010-03-111-1/+1
|
* Remove unused imports in test modules.Georg Brandl2010-02-071-4/+3
|
* Fix wrong usage of "except X, Y:".Georg Brandl2010-02-071-1/+1
|
* #7092: Silence more py3k warnings. Patch by Florent Xicluna.Ezio Melotti2010-02-031-6/+0
|
* use assert[Not]IsInstance where appropriateEzio Melotti2010-01-241-1/+1
|
* Reverting the Revision: 77368. I committed Flox's big patch for tests bySenthil Kumaran2010-01-081-0/+6
| | | | mistake. ( It may come in for sure tough)
* Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. ↵Senthil Kumaran2010-01-081-6/+0
| | | | Patch by flox
* convert usage of fail* to assert*Benjamin Peterson2009-06-301-32/+32
|
* Make test.test_support.EnvironmentVarGuard behave like a dictionary.Walter Dörwald2009-05-011-2/+2
| | | | | All changes are mirrored to the underlying os.environ dict, but rolled back on exit from the with block.
* Use test.test_support.EnvironmentVarGuard where tests change environment vars.Walter Dörwald2009-04-261-16/+4
|
* Patch #2167 from calvin: Remove unused importsChristian Heimes2008-02-231-1/+0
|
* Standardize on test.test_support.run_unittest() (as opposed to a mix of ↵Collin Winter2007-04-251-12/+2
| | | | run_unittest() and run_suite()). Also, add functionality to run_unittest() that admits usage of unittest.TestLoader.loadTestsFromModule().
* Remove a dependency of this test on $COLUMNS.Guido van Rossum2007-01-141-2/+10
|
* Resync optparse with Optik 1.5.3: minor tweaks for/to tests.Greg Ward2006-07-231-4/+5
|
* TestHelp.make_parser(): This was making a permanent change toTim Peters2006-06-191-1/+12
| | | | | | | | | | | | | | os.environ (setting envar COLUMNS), which at least caused test_float_default() to fail if the tests were run more than once. This repairs the test_optparse -R failures Neal reported on python-dev. It also explains some seemingly bizarre test_optparse failures we saw a couple weeks ago on the buildbots, when test_optparse failed due to test_file failing to clean up after itself, and then test_optparse failed in an entirely different way when regrtest's -w option ran test_optparse a second time. It's now obvious that make_parser() permanently changing os.environ was responsible for the second half of that.
* Bug #1498146: fix optparse to handle Unicode strings in option help,Greg Ward2006-06-111-1/+34
| | | | description, and epilog.
* ("Forward-port" of r46506)Armin Rigo2006-05-281-5/+3
| | | | | | | | | | | | | | Remove various dependencies on dictionary order in the standard library tests, and one (clearly an oversight, potentially critical) in the standard library itself - base64.py. Remaining open issues: * test_extcall is an output test, messy to make robust * tarfile.py has a potential bug here, but I'm not familiar enough with this code. Filed in as SF bug #1496501. * urllib2.HTTPPasswordMgr() returns a random result if there is more than one matching root path. I'm asking python-dev for clarification...
* Update optparse to Optik 1.5.1.Greg Ward2006-04-231-55/+145
|
* Get test_optparse to pass in -R mode by stop changing state (COLUMNS env var)Neal Norwitz2006-04-091-0/+7
|
* Whitespace normalization.Tim Peters2004-10-271-4/+4
|
* Update optparse module and test suite to Optik 1.5a2.Greg Ward2004-10-271-192/+214
|
* Whitespace normalization.Tim Peters2004-09-011-3/+3
|
* Use multi-line importAndrew M. Kuchling2004-08-311-4/+4
|
* Whitespace normalization.Tim Peters2004-07-311-5/+5
|
* Be more careful about reverting mutuations to system-wide (sys) variables.Tim Peters2004-07-311-20/+31
| | | | | | | This fixes 15 spurious test failures on Windows (probably all due to the test leaving a wrong path in sys.argv[0], which then prevented regrtest.py from finding the expected-output files for tests running after test_optparse).
* Upgrade optparse module and tests to Optik 1.5a1:Greg Ward2004-07-311-146/+394
| | | | | | | | | | | | | | | | | | | | | | | | | | * add expansion of default values in help text: the string "%default" in an option's help string is expanded to str() of that option's default value, or "none" if no default value. * bug #955889: option default values that happen to be strings are now processed in the same way as values from the command line; this allows generation of nicer help when using custom types. Can be disabled with parser.set_process_default_values(False). * bug #960515: don't crash when generating help for callback options that specify 'type', but not 'dest' or 'metavar'. * feature #815264: change the default help format for short options that take an argument from e.g. "-oARG" to "-o ARG"; add set_short_opt_delimiter() and set_long_opt_delimiter() methods to HelpFormatter to allow (slight) customization of the formatting. * patch #736940: internationalize Optik: all built-in user- targeted literal strings are passed through gettext.gettext(). (If you want translations (.po files), they're not included with Python -- you'll find them in the Optik source distribution from http://optik.sourceforge.net/ .) * bug #878453: respect $COLUMNS environment variable for wrapping help output. * feature #988122: expand "%prog" in the 'description' passed to OptionParser, just like in the 'usage' and 'version' strings. (This is *not* done in the 'description' passed to OptionGroup.)
* Fix support for the "prog" keyword to the OptionParser constructor, as wellFred Drake2004-04-011-0/+16
| | | | | | as directly setting the .prog attribute (which should be supported based on the class docstring). Closes SF bug #850964.
* Combine the functionality of test_support.run_unittest()Walter Dörwald2003-05-011-11/+4
| | | | | | | | | | and test_support.run_classtests() into run_unittest() and use it wherever possible. Also don't use "from test.test_support import ...", but "from test import test_support" in a few spots. From SF patch #662807.
* Test suite for optparse. This is a slightly-edited copy ofGreg Ward2003-04-211-0/+1210
test/test_optik.py (rev 1.19) from the Optik CVS.