mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
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. ........
This commit is contained in:
parent
33841c3489
commit
155374d95d
10 changed files with 79 additions and 68 deletions
|
|
@ -1449,7 +1449,7 @@ def make_parser(self, columns):
|
|||
# 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 @@ def test_help_long_opts_first(self):
|
|||
|
||||
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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue