I need to doc-test a method which has to be wrapped with a decorator that does not apply @functools.wraps or functools.update_wrapper to the method being wrapped. In this case, the doctest does not see the docstring of the method to be tested:
@third_party_decorator
def method_to_be_tested():
"""
>>> method_to_be_tested()
"foo"
"""
return "foo"
This question is similar, however, I cannot change the code of the decorator.
What is the best thing I can do?