diff options
-rw-r--r-- | Lib/test/test_ssl.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 0165de8..193978c 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -103,6 +103,12 @@ class BasicTests(unittest.TestCase): class NetworkedTests(unittest.TestCase): + def setUp(self): + self.old_timeout = socket.getdefaulttimeout() + socket.setdefaulttimeout(30) + + def tearDown(self): + socket.setdefaulttimeout(self.old_timeout) def test_connect(self): s = ssl.wrap_socket(socket.socket(socket.AF_INET), @@ -183,8 +189,6 @@ class NetworkedTests(unittest.TestCase): if not pem: self.fail("No server certificate on svn.python.org:443!") - return - try: pem = ssl.get_server_certificate(("svn.python.org", 443), ca_certs=CERTFILE) except ssl.SSLError as x: |