nose-devs/nose — Issue #128: attrib plugin has problems with classes containing static methods
Author: jpellerin
Created: 2011-12-14 16:01:05+00:00
State: open

If the following test case is saved as "mytest.py", then 'nosetests -a myattr mytest.py' fails because the attrib plugin tries to evaluate "method.im_class" on the staticmethod and blows up since staticmethods don't have an im_class property:

import unittest
from nose.plugins.attrib import attr

class TestWithStatic(unittest.TestCase):
@staticmethod
def hello(): pass

@attr('myattr')
def test_with_static(self): pass

Google Code Info:
Issue #: 411
Author: bob...@gmail.com
Created On: 2011-04-16T02:20:39.000Z
Closed On: 2011-05-02T20:35:18.000Z