Set __wrapped__ for Python 2

This commit is contained in:
Ned Batchelder 2016-10-07 14:56:06 -04:00
parent 969c9153f6
commit 15c28ff077
1 changed files with 1 additions and 0 deletions

1
ddt.py
View File

@ -138,6 +138,7 @@ def feed_data(func, new_name, *args, **kwargs):
def wrapper(self):
return func(self, *args, **kwargs)
wrapper.__name__ = new_name
wrapper.__wrapped__ = func
# Try to call format on the docstring
if func.__doc__:
try: