[pypy-commit] pypy openssl-1.1: Skip running this new test if ssl.get_default_verify_paths() fails (env

arigo pypy.commits at gmail.com
Tue Nov 1 13:13:38 EDT 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: openssl-1.1
Changeset: r88043:5f122f991fba
Date: 2016-11-01 18:09 +0100
http://bitbucket.org/pypy/pypy/changeset/5f122f991fba/

Log:	Skip running this new test if ssl.get_default_verify_paths() fails
	(env not set up)

diff --git a/pypy/module/_ssl/test/test_ssl.py b/pypy/module/_ssl/test/test_ssl.py
--- a/pypy/module/_ssl/test/test_ssl.py
+++ b/pypy/module/_ssl/test/test_ssl.py
@@ -273,6 +273,8 @@
     def test_peer_certificate_verify(self):
         import _ssl, ssl, gc
         paths = ssl.get_default_verify_paths()
+        if not paths.capath and not paths.cafile:
+            skip("ssl.get_default_verify_paths() failed to return any path")
 
         ctx = _ssl._SSLContext(_ssl.PROTOCOL_TLS)
         ctx.verify_mode = _ssl.CERT_REQUIRED


More information about the pypy-commit mailing list