[Python-checkins] r83726 - python/branches/py3k/Lib/test/test_ssl.py

antoine.pitrou python-checkins at python.org
Wed Aug 4 18:45:21 CEST 2010


Author: antoine.pitrou
Date: Wed Aug  4 18:45:21 2010
New Revision: 83726

Log:
In verbose mode, identify OpenSSL build and platform more precisely



Modified:
   python/branches/py3k/Lib/test/test_ssl.py

Modified: python/branches/py3k/Lib/test/test_ssl.py
==============================================================================
--- python/branches/py3k/Lib/test/test_ssl.py	(original)
+++ python/branches/py3k/Lib/test/test_ssl.py	Wed Aug  4 18:45:21 2010
@@ -15,6 +15,7 @@
 import traceback
 import asyncore
 import weakref
+import platform
 
 from http.server import HTTPServer, SimpleHTTPRequestHandler
 
@@ -1424,6 +1425,23 @@
     if skip_expected:
         raise unittest.SkipTest("No SSL support")
 
+    if support.verbose:
+        plats = {
+            'Linux': platform.linux_distribution,
+            'Mac': platform.mac_ver,
+            'Windows': platform.win32_ver,
+        }
+        for name, func in plats.items():
+            plat = func()
+            if plat and plat[0]:
+                plat = '%s %r' % (name, plat)
+                break
+        else:
+            plat = repr(platform.platform())
+        print("test_ssl: testing with %r %r" %
+            (ssl.OPENSSL_VERSION, ssl.OPENSSL_VERSION_INFO))
+        print("          under %s" % plat)
+
     for filename in [
         CERTFILE, SVN_PYTHON_ORG_ROOT_CERT, BYTES_CERTFILE,
         ONLYCERT, ONLYKEY, BYTES_ONLYCERT, BYTES_ONLYKEY,


More information about the Python-checkins mailing list