Commits

Anonymous committed c3bbb55 Merge

Fix urllib.request.build_opener mocking in test_distutils (should fix some random buildbot failures)

  • Participants
  • Parent commits 597b69d, 927946b

Comments (0)

Files changed (1)

File Lib/distutils/tests/test_register.py

         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()