diff options
author | John Szakmeister <john@szakmeister.net> | 2015-03-17 05:58:50 -0400 |
---|---|---|
committer | John Szakmeister <john@szakmeister.net> | 2015-03-17 05:58:50 -0400 |
commit | ae14c6ec9327465087a19bc3006a26acc690d3da (patch) | |
tree | 89b376dfdcf49da180db5f93f05a0ece0ec629be /nose | |
parent | 18271b1f982869bcfb169221e1dd1f2a888ccbee (diff) | |
download | nose-ae14c6ec9327465087a19bc3006a26acc690d3da.tar.gz |
Fix #887: Py 2 vs 3: test name discrepancy
When wrapping a method, we were not copying the docstring. As a result,
the output could differ between running under Python 2 and Python 3.
The fix is simple: copy the docstring, if one exists.
Diffstat (limited to 'nose')
-rw-r--r-- | nose/pyversion.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nose/pyversion.py b/nose/pyversion.py index 8b56614..091238d 100644 --- a/nose/pyversion.py +++ b/nose/pyversion.py @@ -91,6 +91,7 @@ class UnboundMethod: self.__self__ = UnboundSelf(cls) if sys.version_info < (3, 0): self.im_class = cls + self.__doc__ = getattr(func, '__doc__', None) def address(self): cls = self.__self__.cls |