summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_hashlib.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-05-16 14:41:26 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-05-16 14:41:26 (GMT)
commit019ff19c3902633384cace7a1e488a851a67444c (patch)
tree86e090b229d263765a2b4f9d7a83c655df25d141 /Lib/test/test_hashlib.py
parent26fd8feb5e96276bc99d5682865d34deb190b731 (diff)
downloadcpython-019ff19c3902633384cace7a1e488a851a67444c.zip
cpython-019ff19c3902633384cace7a1e488a851a67444c.tar.gz
cpython-019ff19c3902633384cace7a1e488a851a67444c.tar.bz2
Issue #14693: Under non-Windows platforms, hashlib's fallback modules are always compiled, even if OpenSSL is present at build time.
Diffstat (limited to 'Lib/test/test_hashlib.py')
-rw-r--r--Lib/test/test_hashlib.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py
index 97981dd..ce8175a 100644
--- a/Lib/test/test_hashlib.py
+++ b/Lib/test/test_hashlib.py
@@ -9,6 +9,7 @@
import array
import hashlib
import itertools
+import os
import sys
try:
import threading
@@ -37,7 +38,8 @@ class HashLibTestCase(unittest.TestCase):
'sha224', 'SHA224', 'sha256', 'SHA256',
'sha384', 'SHA384', 'sha512', 'SHA512' )
- _warn_on_extension_import = COMPILED_WITH_PYDEBUG
+ # Issue #14693: fallback modules are always compiled under POSIX
+ _warn_on_extension_import = os.name == 'posix' or COMPILED_WITH_PYDEBUG
def _conditional_import_module(self, module_name):
"""Import a module and return a reference to it or None on failure."""