MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / wrapper

Function wrapper

diffusers/src/diffusers/utils/testing_utils.py:799–812  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

797 def decorator(test_func_ref):
798 @functools.wraps(test_func_ref)
799 def wrapper(*args, **kwargs):
800 retry_count = 1
801
802 while retry_count < max_attempts:
803 try:
804 return test_func_ref(*args, **kwargs)
805
806 except Exception as err:
807 print(f"Test failed with {err} at try {retry_count}/{max_attempts}.", file=sys.stderr)
808 if wait_before_retry is not None:
809 time.sleep(wait_before_retry)
810 retry_count += 1
811
812 return test_func_ref(*args, **kwargs)
813
814 return wrapper
815

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected