Commit fd4903bf authored by Nick Coghlan's avatar Nick Coghlan

Move restoration of the os.environ object into the context manager where it belongs

parent 87c03b31
......@@ -60,7 +60,6 @@ class BaseTestCase(unittest.TestCase):
self.lock.release()
self.thread.stop()
os.environ.__exit__()
os.environ = os.environ._environ
def request(self, uri, method='GET', body=None, headers={}):
self.connection = httplib.HTTPConnection('localhost', self.PORT)
......
......@@ -576,6 +576,7 @@ class EnvironmentVarGuard(UserDict.DictMixin):
del self._environ[k]
else:
self._environ[k] = v
os.environ = self._environ
class DirsOnSysPath(object):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment