def run_test(*args, **kwargs): ecc_fast.undo_monkey_patching_of_python_ecdsa_internals_with_libsecp256k1() try: # first test without libsecp func(*args, **kwargs) finally: # if libsecp is not available, we are done if not ecc_fast._libsecp256k1: return ecc_fast.do_monkey_patching_of_python_ecdsa_internals_with_libsecp256k1() # if libsecp is available, test again now func(*args, **kwargs)
def run_test(*args, **kwargs): if FAST_TESTS: # if set, only run tests once, using fastest implementation func(*args, **kwargs) return ecc_fast.undo_monkey_patching_of_python_ecdsa_internals_with_libsecp256k1() try: # first test without libsecp func(*args, **kwargs) finally: # if libsecp is not available, we are done if not ecc_fast._libsecp256k1: return ecc_fast.do_monkey_patching_of_python_ecdsa_internals_with_libsecp256k1() # if libsecp is available, test again now func(*args, **kwargs)
def run_test(*args, **kwargs): if FAST_TESTS: # if set, only run tests once, using fastest implementation func(*args, **kwargs) return ecc_fast.undo_monkey_patching_of_python_ecdsa_internals_with_libsecp256k1() try: # first test without libsecp func(*args, **kwargs) finally: # if libsecp is not available, we are done if not ecc_fast._libsecp256k1: return ecc_fast.do_monkey_patching_of_python_ecdsa_internals_with_libsecp256k1() # if libsecp is available, test again now func(*args, **kwargs)