@classmethod
def __del__(cls):
    print('Test teardown')

def test_hello(cls):
    print('Hello')
if __name__ == '__main__':
    unittest.main()
How to fail a python unittest if the setUpClass throws exception