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 4b26903 commit a80ad5cCopy full SHA for a80ad5c
1 file changed
Lib/test/support/hashlib_helper.py
@@ -985,9 +985,11 @@ def _block_builtin_hmac_constructor(name):
985
if (wrapped := info.import_member()) is None:
986
# function shouldn't exist for this implementation
987
return contextlib.nullcontext()
988
+
989
@functools.wraps(wrapped)
990
def wrapper(key, obj):
991
raise ValueError(f"blocked hash name: {name}")
992
993
_ensure_wrapper_signature(wrapper, wrapped)
994
return unittest.mock.patch(info.fullname, wrapper)
995
0 commit comments