Unlike instance methods, attempts to ignore a static method directly using @nottest
or __test__ = False
do not work with nose.
Example with @nottest
:
from nose.tools import nottest
class TestHelper:
@nottest
@staticmethod
def test_my_sample_test_helper()
#code here ...
Example with __test__ = False
:
class TestHelper:
@staticmethod
def test_my_sample_test_helper()
__test__ = False
#code here ...
# Or it could normally be set here.
# test_my_sample_test_helper.__test__ = False
So how are static methods ignored in nose?