diff options
author | Victor Stinner <vstinner@python.org> | 2022-05-26 00:12:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-26 00:12:54 +0200 |
commit | 518595652759462b13904df767f69b8cc2c61143 (patch) | |
tree | 28cf498655b4c223ab6e6daab68408663a196c3f /Lib/test/test_hashlib.py | |
parent | ca58e4a2c596d1b4cdcae9ec92844d3d3272c4ce (diff) | |
download | cpython-518595652759462b13904df767f69b8cc2c61143.tar.gz cpython-518595652759462b13904df767f69b8cc2c61143.zip |
gh-69443: Add test.support.Py_DEBUG constant (#93226)
Diffstat (limited to 'Lib/test/test_hashlib.py')
-rw-r--r-- | Lib/test/test_hashlib.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py index 67becdd6d31..bc9407dc9e4 100644 --- a/Lib/test/test_hashlib.py +++ b/Lib/test/test_hashlib.py @@ -26,8 +26,6 @@ from test.support import threading_helper from test.support import warnings_helper from http.client import HTTPException -# Were we compiled --with-pydebug or with #define Py_DEBUG? -COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount') # default builtin hash module default_builtin_hashes = {'md5', 'sha1', 'sha256', 'sha512', 'sha3', 'blake2'} @@ -109,7 +107,7 @@ class HashLibTestCase(unittest.TestCase): shakes = {'shake_128', 'shake_256'} # Issue #14693: fallback modules are always compiled under POSIX - _warn_on_extension_import = os.name == 'posix' or COMPILED_WITH_PYDEBUG + _warn_on_extension_import = (os.name == 'posix' or support.Py_DEBUG) def _conditional_import_module(self, module_name): """Import a module and return a reference to it or None on failure.""" |