diff options
author | Greg Ward <gward@python.net> | 2006-07-23 16:05:51 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2006-07-23 16:05:51 (GMT) |
commit | 48fae7acd2c1a1d467a78688d4eeaea3315d5f98 (patch) | |
tree | e90cc7cd59454b7309ae015c7c16b4410114c1ba /Lib/test | |
parent | afa358fabf2632c218d106550a1a4dba9b6957b0 (diff) | |
download | cpython-48fae7acd2c1a1d467a78688d4eeaea3315d5f98.zip cpython-48fae7acd2c1a1d467a78688d4eeaea3315d5f98.tar.gz cpython-48fae7acd2c1a1d467a78688d4eeaea3315d5f98.tar.bz2 |
Resync optparse with Optik 1.5.3: minor tweaks for/to tests.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_optparse.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_optparse.py b/Lib/test/test_optparse.py index 9fcbe85..4582fa7 100644 --- a/Lib/test/test_optparse.py +++ b/Lib/test/test_optparse.py @@ -1460,10 +1460,11 @@ class TestHelp(BaseTest): make_option("--foo", action="append", type="string", dest='foo', help="store FOO in the foo list for later fooing"), ] - # The parser constructor looks at the COLUMNS envar. We need to - # restore the original value after the parser is constructed, else - # that's a permanent change possibly affecting other tests, and - # definitely affecting these tests when they're run multiple times. + + # We need to set COLUMNS for the OptionParser constructor, but + # we must restore its original value -- otherwise, this test + # screws things up for other tests when it's part of the Python + # test suite. orig_columns = os.environ.get('COLUMNS') os.environ['COLUMNS'] = str(columns) try: |