tenacity icon indicating copy to clipboard operation
tenacity copied to clipboard

Changing Arguments at Run Time to a Method

Open oren0e opened this issue 3 years ago • 0 comments

If I have a method like MyClass.my_method() which I decorated with retry() and then want to change the arguments in run time (e.g, for unit testing), then I cannot do it like:

c = MyClass()
c.my_method.retry_with(...)   # some arguments there

because python complains that the first argument which is self is missing. How can I pull this off?

oren0e avatar Jul 13 '21 11:07 oren0e