summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2008-03-23 05:47:20 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2008-03-23 05:47:20 (GMT)
commit41d649116ce21d1a4aa1cdbb002db1eff5fba51f (patch)
treeb8b14b96e3744a9528cb90ab4cbf929e2bef228f /Lib/test
parentacbd6420e35754d31039e53333171f3ee50fcdc6 (diff)
downloadcpython-41d649116ce21d1a4aa1cdbb002db1eff5fba51f.zip
cpython-41d649116ce21d1a4aa1cdbb002db1eff5fba51f.tar.gz
cpython-41d649116ce21d1a4aa1cdbb002db1eff5fba51f.tar.bz2
Suppress failure (to avoid a flaky test) if we cannot connect to svn.python.org
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_socket_ssl.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/Lib/test/test_socket_ssl.py b/Lib/test/test_socket_ssl.py
index 7003ba6..266760f 100644
--- a/Lib/test/test_socket_ssl.py
+++ b/Lib/test/test_socket_ssl.py
@@ -55,7 +55,7 @@ class ConnectedTests(unittest.TestCase):
def error_msg(extra_msg):
print >> sys.stderr, """\
WARNING: an attempt to connect to %r %s, in
- test_timeout. That may be legitimate, but is not the outcome we
+ testTimeout. That may be legitimate, but is not the outcome we
hoped for. If this message is seen often, testTimeout should be
changed to use a more reliable address.""" % (ADDR, extra_msg)
@@ -145,7 +145,15 @@ class BasicTests(unittest.TestCase):
import os, httplib, ssl
with test_support.transient_internet():
s = socket.socket(socket.AF_INET)
- self.connect(s, ("svn.python.org", 443))
+ try:
+ self.connect(s, ("svn.python.org", 443))
+ except IOError:
+ print >> sys.stderr, """\
+ WARNING: an attempt to connect to svn.python.org:443 failed, in
+ test_978833. That may be legitimate, but is not the outcome we
+ hoped for. If this message is seen often, test_978833 should be
+ changed to use a more reliable address."""
+ return
fd = s._sock.fileno()
sock = ssl.wrap_socket(s)
s = None