summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_optparse.py
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2009-05-01 19:58:58 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2009-05-01 19:58:58 (GMT)
commit155374d95d8ecd235d3a3edd92dd6f6a23d59f11 (patch)
tree91deb4c1d292387d2b216d869e79311cad1dbc61 /Lib/test/test_optparse.py
parent33841c34896834daa8ee38d3ff54d7800b9723c2 (diff)
downloadcpython-155374d95d8ecd235d3a3edd92dd6f6a23d59f11.zip
cpython-155374d95d8ecd235d3a3edd92dd6f6a23d59f11.tar.gz
cpython-155374d95d8ecd235d3a3edd92dd6f6a23d59f11.tar.bz2
Merged revisions 72167 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72167 | walter.doerwald | 2009-05-01 19:35:37 +0200 (Fr, 01 Mai 2009) | 5 lines Make test.test_support.EnvironmentVarGuard behave like a dictionary. All changes are mirrored to the underlying os.environ dict, but rolled back on exit from the with block. ........
Diffstat (limited to 'Lib/test/test_optparse.py')
-rw-r--r--Lib/test/test_optparse.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_optparse.py b/Lib/test/test_optparse.py
index e4ede4a..9c52f86 100644
--- a/Lib/test/test_optparse.py
+++ b/Lib/test/test_optparse.py
@@ -1449,7 +1449,7 @@ class TestHelp(BaseTest):
# screws things up for other tests when it's part of the Python
# test suite.
with support.EnvironmentVarGuard() as env:
- env.set('COLUMNS', str(columns))
+ env['COLUMNS'] = str(columns)
return InterceptingOptionParser(option_list=options)
def assertHelpEquals(self, expected_output):
@@ -1474,7 +1474,7 @@ class TestHelp(BaseTest):
def test_help_title_formatter(self):
with support.EnvironmentVarGuard() as env:
- env.set("COLUMNS", "80")
+ env["COLUMNS"] = "80"
self.parser.formatter = TitledHelpFormatter()
self.assertHelpEquals(_expected_help_title_formatter)