summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib2_localnet.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_urllib2_localnet.py')
-rw-r--r--Lib/test/test_urllib2_localnet.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_urllib2_localnet.py b/Lib/test/test_urllib2_localnet.py
index 591b48d..6b9b130 100644
--- a/Lib/test/test_urllib2_localnet.py
+++ b/Lib/test/test_urllib2_localnet.py
@@ -447,6 +447,9 @@ class TestUrlopen(unittest.TestCase):
def setUp(self):
super(TestUrlopen, self).setUp()
+ # clear _opener global variable
+ self.addCleanup(urllib.request.urlcleanup)
+
# Ignore proxies for localhost tests.
def restore_environ(old_environ):
os.environ.clear()