From: Gregory P. Smith Date: Mon, 18 Nov 2013 21:10:04 +0000 (+0000) Subject: Cleanup this test's modification of os.environ in teardown (this already X-Git-Tag: v3.4.0b1~191^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=30d8e167ff37f25f63cced74cac970ca409cbd99;p=thirdparty%2FPython%2Fcpython.git Cleanup this test's modification of os.environ in teardown (this already exists in 3.4 but apparently wasn't done for 3.3). --- diff --git a/Lib/test/test_urllib2_localnet.py b/Lib/test/test_urllib2_localnet.py index b1aa1584553c..9112e5062b1c 100644 --- a/Lib/test/test_urllib2_localnet.py +++ b/Lib/test/test_urllib2_localnet.py @@ -353,12 +353,15 @@ class TestUrlopen(unittest.TestCase): def setUp(self): super(TestUrlopen, self).setUp() # Ignore proxies for localhost tests. + self.old_environ = os.environ.copy() os.environ['NO_PROXY'] = '*' self.server = None def tearDown(self): if self.server is not None: self.server.stop() + os.environ.clear() + os.environ.update(self.old_environ) super(TestUrlopen, self).tearDown() def urlopen(self, url, data=None, **kwargs):