diff options
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | functional_tests/test_attribute_plugin.py | 10 | ||||
-rw-r--r-- | nose/pyversion.py | 1 |
3 files changed, 13 insertions, 0 deletions
@@ -67,6 +67,8 @@ In Development - Fix #771: attr plugin is broken when parent and child share same method name with different attributes Patch by John Szakmeister. Test case provided by Thomas Grainger. +- Fix #728: attrib plugin rejects any staticmethod + Patch by John Szakmesiter. Test case provided by Thomas Kluyver. 1.3.0 diff --git a/functional_tests/test_attribute_plugin.py b/functional_tests/test_attribute_plugin.py index 249bec5..c9bab66 100644 --- a/functional_tests/test_attribute_plugin.py +++ b/functional_tests/test_attribute_plugin.py @@ -170,6 +170,16 @@ class TestTopLevelNotSelected(AttributePluginTester): assert 'TestDerived' not in self.output +# Issue #728 +class TestStaticMethod(AttributePluginTester): + suitepath = os.path.join(support, 'attrib-static') + args = ["-a", "!slow"] + + def verify(self): + assert 'test.TestAttrib.test_static ... ok' in self.output + assert 'Ran 1 test' in self.output + + if compat_24: class TestAttributeEval(AttributePluginTester): args = ["-A", "c>20"] diff --git a/nose/pyversion.py b/nose/pyversion.py index 07c105f..fba5ada 100644 --- a/nose/pyversion.py +++ b/nose/pyversion.py @@ -89,6 +89,7 @@ class UnboundMethod: self.__dict__ = func.__dict__.copy() self._func = func self.__self__ = UnboundSelf(cls) + self.im_class = cls def address(self): cls = self.__self__.cls |