summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ssl.py
diff options
context:
space:
mode:
authorPaul Monson <paulmon@users.noreply.github.com>2019-06-19 20:09:54 (GMT)
committerSteve Dower <steve.dower@python.org>2019-06-19 20:09:54 (GMT)
commitf355069a3337711642c3403429afb9faef93f512 (patch)
treec2a749be8e1921205c676ecdb22fe8703d947c42 /Lib/test/test_ssl.py
parent12f1c726d8328e5e096c35c36901f6d19bc942d3 (diff)
downloadcpython-f355069a3337711642c3403429afb9faef93f512.zip
cpython-f355069a3337711642c3403429afb9faef93f512.tar.gz
cpython-f355069a3337711642c3403429afb9faef93f512.tar.bz2
bpo-36511: Add buildbot scripts and fix tests for Windows ARM32 buildbot (GH-13454)
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r--Lib/test/test_ssl.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 7ba8156..c72a857 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -28,6 +28,9 @@ ssl = support.import_module("ssl")
from ssl import TLSVersion, _TLSContentType, _TLSMessageType, _TLSAlertType
+Py_DEBUG = hasattr(sys, 'gettotalrefcount')
+Py_DEBUG_WIN32 = Py_DEBUG and sys.platform == 'win32'
+
PROTOCOLS = sorted(ssl._PROTOCOL_NAMES)
HOST = support.HOST
IS_LIBRESSL = ssl.OPENSSL_VERSION.startswith('LibreSSL')
@@ -1347,6 +1350,7 @@ class ContextTests(unittest.TestCase):
ctx.load_verify_locations(cadata=b"broken")
+ @unittest.skipIf(Py_DEBUG_WIN32, "Avoid mixing debug/release CRT on Windows")
def test_load_dh_params(self):
ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
ctx.load_dh_params(DHFILE)
@@ -1665,6 +1669,7 @@ class SSLErrorTests(unittest.TestCase):
self.assertEqual(str(e), "foo")
self.assertEqual(e.errno, 1)
+ @unittest.skipIf(Py_DEBUG_WIN32, "Avoid mixing debug/release CRT on Windows")
def test_lib_reason(self):
# Test the library and reason attributes
ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
@@ -3845,6 +3850,7 @@ class ThreadedTests(unittest.TestCase):
sni_name=hostname)
self.assertIs(stats['compression'], None)
+ @unittest.skipIf(Py_DEBUG_WIN32, "Avoid mixing debug/release CRT on Windows")
def test_dh_params(self):
# Check we can get a connection with ephemeral Diffie-Hellman
client_context, server_context, hostname = testing_context()
@@ -4440,6 +4446,7 @@ class TestSSLDebug(unittest.TestCase):
return len(list(f))
@requires_keylog
+ @unittest.skipIf(Py_DEBUG_WIN32, "Avoid mixing debug/release CRT on Windows")
def test_keylog_defaults(self):
self.addCleanup(support.unlink, support.TESTFN)
ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
@@ -4463,6 +4470,7 @@ class TestSSLDebug(unittest.TestCase):
ctx.keylog_filename = 1
@requires_keylog
+ @unittest.skipIf(Py_DEBUG_WIN32, "Avoid mixing debug/release CRT on Windows")
def test_keylog_filename(self):
self.addCleanup(support.unlink, support.TESTFN)
client_context, server_context, hostname = testing_context()
@@ -4500,6 +4508,7 @@ class TestSSLDebug(unittest.TestCase):
@requires_keylog
@unittest.skipIf(sys.flags.ignore_environment,
"test is not compatible with ignore_environment")
+ @unittest.skipIf(Py_DEBUG_WIN32, "Avoid mixing debug/release CRT on Windows")
def test_keylog_env(self):
self.addCleanup(support.unlink, support.TESTFN)
with unittest.mock.patch.dict(os.environ):