tenacity icon indicating copy to clipboard operation
tenacity copied to clipboard

Cannot easily mock out async sleep function

Open mattepozz opened this issue 3 years ago • 0 comments

Issue #228 pointed out that it was difficult to patch the sleep function in tests. It was then fixed and now mocking time.sleep is straightforward.

Could the same be done for the async version AsyncRetrying? It would be nice if it was equally easy to mock asyncio.sleep.

mattepozz avatar Jul 22 '22 15:07 mattepozz