summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-12-21 23:44:28 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-12-21 23:44:28 (GMT)
commit23b8cd963d94a2f583c4b5bf0423967cd7966e79 (patch)
treef7e131a2d9742dd1ca72136c72a97b5364c6ac77 /Lib/distutils
parent29fd05f900d3bb2f856269cb667ed424570533c6 (diff)
parent6783487757be881e4ea6e0c9bae36374da7014c2 (diff)
downloadcpython-23b8cd963d94a2f583c4b5bf0423967cd7966e79.zip
cpython-23b8cd963d94a2f583c4b5bf0423967cd7966e79.tar.gz
cpython-23b8cd963d94a2f583c4b5bf0423967cd7966e79.tar.bz2
Fix urllib.request.build_opener mocking in test_distutils (should fix some random buildbot failures)
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/tests/test_register.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/distutils/tests/test_register.py b/Lib/distutils/tests/test_register.py
index 8bcc858..6180133 100644
--- a/Lib/distutils/tests/test_register.py
+++ b/Lib/distutils/tests/test_register.py
@@ -81,11 +81,13 @@ class RegisterTestCase(PyPIRCCommandTestCase):
def _getpass(prompt):
return 'password'
getpass.getpass = _getpass
+ urllib.request._opener = None
self.old_opener = urllib.request.build_opener
self.conn = urllib.request.build_opener = FakeOpener()
def tearDown(self):
getpass.getpass = self._old_getpass
+ urllib.request._opener = None
urllib.request.build_opener = self.old_opener
super(RegisterTestCase, self).tearDown()