tenacity
tenacity copied to clipboard
Changing Arguments at Run Time to a Method
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?