summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ssl.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-08-14 17:28:36 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-08-14 17:28:36 (GMT)
commitb233b7d7b59220791e9ecb4d3469225c7646ccca (patch)
tree4a08d26820efbd9f1b64525dd95b6c1f6b6d669a /Lib/test/test_ssl.py
parent633e474d2d46193ecc397a142d55e9f1ed644f9f (diff)
downloadcpython-b233b7d7b59220791e9ecb4d3469225c7646ccca.zip
cpython-b233b7d7b59220791e9ecb4d3469225c7646ccca.tar.gz
cpython-b233b7d7b59220791e9ecb4d3469225c7646ccca.tar.bz2
Merged revisions 84021-84023 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84021 | antoine.pitrou | 2010-08-14 18:24:38 +0200 (sam., 14 août 2010) | 4 lines Add a reasonable timeout to network SSL tests, so as to avoid buildbot timeouts when the remote server doesn't answer. ........ r84022 | antoine.pitrou | 2010-08-14 18:32:10 +0200 (sam., 14 août 2010) | 4 lines This is a better resolution than r84021 (because it will also affect ssl.get_server_certificate()). ........ r84023 | antoine.pitrou | 2010-08-14 18:33:38 +0200 (sam., 14 août 2010) | 3 lines There doesn't seem to be a reason for this test to be disabled. ........
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r--Lib/test/test_ssl.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index a7bcf94..c32ee04 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -181,6 +181,12 @@ class BasicSocketTests(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),