(name, dummy, implementation)
| 968 | |
| 969 | |
| 970 | def _make_hash_constructor_blocker(name, dummy, implementation): |
| 971 | info = get_hash_func_info(name)[implementation] |
| 972 | if (wrapped := info.import_member()) is None: |
| 973 | # function shouldn't exist for this implementation |
| 974 | return contextlib.nullcontext() |
| 975 | wrapper = functools.wraps(wrapped)(dummy) |
| 976 | _ensure_wrapper_signature(wrapper, wrapped) |
| 977 | return unittest.mock.patch(info.fullname, wrapper) |
| 978 | |
| 979 | |
| 980 | def _block_hashlib_hash_constructor(name): |
no test coverage detected
searching dependent graphs…