Merge pull request #45 from nedbat/master

Set __wrapped__ for Python 2
This commit is contained in:
Carles Barrobés 2016-10-07 21:06:10 +02:00 committed by GitHub
commit 7198dfbd9a
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: