summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-06 12:54:58 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-01-06 12:54:58 (GMT)
commitfcfed1991382f9697df574fae4115a9f815adca0 (patch)
tree5f9519dcdc56aab61eea2e7d6ef280f1f70e47f5 /Lib/test
parent9d01717f373d0180e2804c827efbc40d8cf72063 (diff)
downloadcpython-fcfed1991382f9697df574fae4115a9f815adca0.zip
cpython-fcfed1991382f9697df574fae4115a9f815adca0.tar.gz
cpython-fcfed1991382f9697df574fae4115a9f815adca0.tar.bz2
Issue #21356: Make ssl.RAND_egd() optional to support LibreSSL. The
availability of the function is checked during the compilation. Patch written by Bernard Spil.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_ssl.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 9885eae..0a7b905 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -154,8 +154,9 @@ class BasicSocketTests(unittest.TestCase):
self.assertRaises(ValueError, ssl.RAND_bytes, -5)
self.assertRaises(ValueError, ssl.RAND_pseudo_bytes, -5)
- self.assertRaises(TypeError, ssl.RAND_egd, 1)
- self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
+ if hasattr(ssl, 'RAND_egd'):
+ self.assertRaises(TypeError, ssl.RAND_egd, 1)
+ self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
ssl.RAND_add("this is a random string", 75.0)
@unittest.skipUnless(os.name == 'posix', 'requires posix')