python/python-2.7.17-switch-off-failing-SSL-tests.patch
Matej Cepl 54c4187a2a - Add python-2.7.17-switch-off-failing-SSL-tests.patch to switch
off tests coliding with the combination of modern Python and
  ancient OpenSSL on SLE-12.

- Add python-2.7.17-switch-off-failing-SSL-tests.patch to switch
  off tests coliding with the combination of modern Python and
  ancient OpenSSL on SLE-12.

- libnsl is required only on more recent SLEs and openSUSE, older
  glibc supported NIS on its own.

- Add python-2.7.17-switch-off-failing-SSL-tests.patch to switch
  off tests coliding with the combination of modern Python and
  ancient OpenSSL on SLE-12.

- libnsl is required only on more recent SLEs and openSUSE, older
  glibc supported NIS on its own.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=272
2020-01-28 14:39:17 +00:00

22 lines
951 B
Diff

--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -152,9 +152,7 @@ def skip_if_broken_ubuntu_ssl(func):
try:
ssl.SSLContext(ssl.PROTOCOL_SSLv2)
except ssl.SSLError:
- if (ssl.OPENSSL_VERSION_INFO == (0, 9, 8, 15, 15) and
- platform.linux_distribution() == ('debian', 'squeeze/sid', '')):
- raise unittest.SkipTest("Patched Ubuntu OpenSSL breaks behaviour")
+ raise unittest.SkipTest("Test fails on SLE-12")
return func(*args, **kwargs)
return f
else:
@@ -1280,6 +1278,7 @@ class ContextTests(unittest.TestCase):
self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
self._assert_context_options(ctx)
+ @skip_if_broken_ubuntu_ssl
def test__https_verify_certificates(self):
# Unit test to check the contect factory mapping
# The factories themselves are tested above