From ae14c6ec9327465087a19bc3006a26acc690d3da Mon Sep 17 00:00:00 2001 From: John Szakmeister Date: Tue, 17 Mar 2015 05:58:50 -0400 Subject: 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. --- nose/pyversion.py | 1 + 1 file changed, 1 insertion(+) (limited to 'nose') 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 -- cgit v1.2.1