[Python-checkins] cpython (merge 3.2 -> 3.3): Forward port new test for SSLSocket.connect_ex()
antoine.pitrou
python-checkins at python.org
Fri Dec 28 19:11:44 CET 2012
http://hg.python.org/cpython/rev/e0761560d844
changeset: 81130:e0761560d844
branch: 3.3
parent: 81125:157ff02bcc16
parent: 81129:ee8d999b6e05
user: Antoine Pitrou <solipsis at pitrou.net>
date: Fri Dec 28 19:08:49 2012 +0100
summary:
Forward port new test for SSLSocket.connect_ex()
files:
Lib/test/test_ssl.py | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -714,6 +714,17 @@
finally:
s.close()
+ def test_connect_ex_error(self):
+ with support.transient_internet("svn.python.org"):
+ s = ssl.wrap_socket(socket.socket(socket.AF_INET),
+ cert_reqs=ssl.CERT_REQUIRED,
+ ca_certs=SVN_PYTHON_ORG_ROOT_CERT)
+ try:
+ self.assertEqual(errno.ECONNREFUSED,
+ s.connect_ex(("svn.python.org", 444)))
+ finally:
+ s.close()
+
def test_connect_with_context(self):
with support.transient_internet("svn.python.org"):
# Same as test_connect, but with a separately created context
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list