summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-12-16 20:15:44 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-12-16 20:15:44 (GMT)
commitde57074874931bafb5fc1a91cebfb636798b7228 (patch)
tree5d2485ce78e18f1e6f6d0be01ad31aab86ddb31f /Lib
parent1007432c95acee46a09b08306ef1859b97a184b0 (diff)
downloadcpython-de57074874931bafb5fc1a91cebfb636798b7228.zip
cpython-de57074874931bafb5fc1a91cebfb636798b7228.tar.gz
cpython-de57074874931bafb5fc1a91cebfb636798b7228.tar.bz2
Issue #19919: Fix flacky SSL test. connect_ex() sometimes returns
EWOULDBLOCK on Windows or VMs hosted on Windows.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_ssl.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 06d4598..f235daf 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -835,8 +835,10 @@ class NetworkedTests(unittest.TestCase):
cert_reqs=ssl.CERT_REQUIRED,
ca_certs=SVN_PYTHON_ORG_ROOT_CERT)
try:
- self.assertEqual(errno.ECONNREFUSED,
- s.connect_ex(("svn.python.org", 444)))
+ rc = s.connect_ex(("svn.python.org", 444))
+ # Issue #19919: Windows machines or VMs hosted on Windows
+ # machines sometimes return EWOULDBLOCK.
+ self.assertIn(rc, (errno.ECONNREFUSED, errno.EWOULDBLOCK))
finally:
s.close()