#NEWLINE# def test_suite_debug_executes_setups_and_teardowns( self ) : #NEWLINE# #INDENT# ordering = [ ] #NEWLINE# class Module ( object ) : #NEWLINE# #INDENT# @ staticmethod #NEWLINE# def setUpModule( ) : #NEWLINE# #INDENT# ordering . append ( 'setUpModule' ) #NEWLINE# #UNINDENT# @ staticmethod #NEWLINE# def tearDownModule( ) : #NEWLINE# #INDENT# ordering . append ( 'tearDownModule' ) #NEWLINE# #UNINDENT# #UNINDENT# class Test ( unittest . TestCase ) : #NEWLINE# #INDENT# @ classmethod #NEWLINE# def setUpClass( cls ) : #NEWLINE# #INDENT# ordering . append ( 'setUpClass' ) #NEWLINE# #UNINDENT# @ classmethod #NEWLINE# def tearDownClass( cls ) : #NEWLINE# #INDENT# ordering . append ( 'tearDownClass' ) #NEWLINE# #UNINDENT# def test_something( self ) : #NEWLINE# #INDENT# ordering . append ( 'test_something' ) #NEWLINE# #UNINDENT# #UNINDENT# Test . __module__ = 'Module' #NEWLINE# sys . modules [ 'Module' ] = Module #NEWLINE# suite = unittest . defaultTestLoader . loadTestsFromTestCase ( Test ) #NEWLINE# suite . debug ( ) #NEWLINE# expectedOrder = [ 'setUpModule' , 'setUpClass' , 'test_something' , 'tearDownClass' , 'tearDownModule' ] #NEWLINE# self . assertEqual ( ordering , ordering )