In python How to unit test a tenacity library retry

79 views Asked by At

I have a function with tenacity library retry

@retry(stop=stop_after_attempt(3))
def func():
    pass

How do I unit test that the retry will execute 3 times? Thanks

0

There are 0 answers