summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket_ssl.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2007-03-13 02:34:09 (GMT)
committerBrett Cannon <bcannon@gmail.com>2007-03-13 02:34:09 (GMT)
commit41d4e32353a546036d76c154169917f5f754ce09 (patch)
tree639cdacc6cf63d28c7d9c26e0745be3c28153502 /Lib/test/test_socket_ssl.py
parent192cd567bdb7791560629ea43365cd1079f2fc54 (diff)
downloadcpython-41d4e32353a546036d76c154169917f5f754ce09.zip
cpython-41d4e32353a546036d76c154169917f5f754ce09.tar.gz
cpython-41d4e32353a546036d76c154169917f5f754ce09.tar.bz2
Add test.test_support.transient_internet . Returns a context manager that
nests test.test_support.TransientResource context managers that capture exceptions raised when the Internet connection is flaky. Initially using in test_socket_ssl but should probably be expanded to cover any test that should not raise the captured exceptions if the Internet connection works.
Diffstat (limited to 'Lib/test/test_socket_ssl.py')
-rw-r--r--Lib/test/test_socket_ssl.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_socket_ssl.py b/Lib/test/test_socket_ssl.py
index 8fb7e4c..1f2b9d1 100644
--- a/Lib/test/test_socket_ssl.py
+++ b/Lib/test/test_socket_ssl.py
@@ -27,7 +27,7 @@ def test_basic():
print "didn't raise TypeError"
socket.RAND_add("this is a random string", 75.0)
- with test_support.TransientResource(IOError, errno=errno.ETIMEDOUT):
+ with test_support.transient_internet():
f = urllib.urlopen('https://sf.net')
buf = f.read()
f.close()