All of my nosetests are of the form:
def test_555(): chk(555); do_some_testing(...)
def test_556(): chk(556); some_more_testing()
The chk() function will check to see if that test number is one that I am currently wanting to execute -- this is my own ignore-test logic based on numeric ranges. this function simply raises: unittest.SkipTest() to skip a test.
I am happy with this setup, but I would like to somehow auto decorate ALL of my tests in a way that I automatically derive the 'chk(i)' check for each test. I cannot see how to obtain the currently executing test object, during the test itself, nor how to somehow auto decorate all tests.
but maybe there is a better way? My goal to be able to update :
RUN_TESTS = (590,720)
in my source code, and have the correct thing happen
thanks!
nose-parametarized is your friend:
Running tests:
Selecting tests: