I have the following directory structure for my unit tests.
top/
test1/
test2/
test3/
...
Each test1 directory has an __init__.py that contains a class such as TestSomething that does the actual testing.
To temporarily disable these tests, I have to go through each __init__.py file and add the @unittest.skip decorator to the TestSomething classes.
http://docs.python.org/2/library/unittest.html#skipping-tests-and-expected-failures
As the number of tests has grown, this is becoming a tedious task because I have to go through each directory to disable the tests.
I am wondering if there's an easier way to disable all tests under a certain directory. For instance, is it possible to set something in top/__init__.py to turn off all tests in top?
topdirectory outside the project directory temporarily, then restore when you're done ?python -m unittest discover?python -m unittest discover.