Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Ensure shell tests use isolated env variables set

Fixes bug 1161008.

Change-Id: Id9d76f39c898d4cff65aefa636e9dd2f092d42bd
  • Loading branch information...
commit cdab77259a5410fe4e89e90e2d83b316216d0e9b 1 parent 243c8ff
@malor malor authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 tests/
6 tests/
@@ -20,10 +20,8 @@
class ShellTest(utils.TestCase):
def make_env(self, exclude=None):
- for var, val in FAKE_ENV.items():
- if var == exclude:
- continue
- self.useFixture(fixtures.EnvironmentVariable(var, val))
+ env = dict((k, v) for k, v in FAKE_ENV.items() if k != exclude)
+ self.useFixture(fixtures.MonkeyPatch('os.environ', env))
def setUp(self):
super(ShellTest, self).setUp()

0 comments on commit cdab772

Please sign in to comment.
Something went wrong with that request. Please try again.