Commits

Antoine Pitrou  committed ee8d999 Draft Merge

Forward port new test for SSLSocket.connect_ex()

  • Participants
  • Parent commits e4ea38a, 3436769
  • Branches 3.2

Comments (0)

Files changed (3)

File Lib/ssl.py

File contents unchanged.

File Lib/test/test_ssl.py

             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

File Misc/NEWS

File contents unchanged.