import unittest salmon = 0 class TestMyClass(): def setup_method(self,method): print "setup: ",str(method) def teardown_method(self,method): if(salmon): assert 0 print "teardown: ",str(method) def test_Apa1(self): pass def testApa2(self): global salmon salmon = 1 pass def testApa3(self): pass