self.fail("test")
put into your setUp instance method fails all the tests
I think the easiest way to do this at the class level is to make a class variable so something like:
@classmethod
def setUpClass(cls):
cls.flag = False
def setUp(self):
if self.flag:
self.fail("conditions not met")
Hope this is what you want.