#NEWLINE# def test_run( self ) : #NEWLINE# #INDENT# events = [ ] #NEWLINE# result = LoggingResult ( events ) #NEWLINE# class LoggingCase ( unittest . TestCase ) : #NEWLINE# #INDENT# def run( self , result ) : #NEWLINE# #INDENT# events . append ( ( 'run %s' % self . _testMethodName ) ) #NEWLINE# #UNINDENT# def test1( self ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# def test2( self ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# tests = [ LoggingCase ( 'test1' ) , LoggingCase ( 'test2' ) ] #NEWLINE# unittest . TestSuite ( tests ) . run ( self ) #NEWLINE# self . assertEqual ( events , [ 'run test1' , 'run test2' ] )