Description
this would break on things like the mock.call object, there should be an iteration limit
i propose using something like
for _ in range(1000):
new_func = getattr(func, '__wrapped__', None)
if new_func is None:
break
else:
func = new_func
else:
raise ValueError("unwrap failed to find a end")
all tho i presume we can pick a much lower iteration count
Metadata
Metadata
Assignees
Labels
No labels