We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f079979 commit 9ace9afCopy full SHA for 9ace9af
Lib/test/test_hashlib.py
@@ -274,7 +274,10 @@ def test_clinic_signature(self):
274
with self.assertWarnsRegex(DeprecationWarning,
275
DEPRECATED_STRING_PARAMETER):
276
hashlib.new(digest_name, string=b'')
277
- if self._hashlib:
+ # when using a combination of libcrypto and interned hash
278
+ # implementations, we need to make sure that _hashlib contains
279
+ # the constructor we're testing
280
+ if self._hashlib and digest_name in self._hashlib._constructors:
281
self._hashlib.new(digest_name, b'')
282
self._hashlib.new(digest_name, data=b'')
283
0 commit comments