#NEWLINE# def _run_suite( suite ) : #NEWLINE# #INDENT# 'Run tests from a unittest.TestSuite-derived class.' #NEWLINE# if verbose : #NEWLINE# #INDENT# runner = unittest . TextTestRunner ( sys . stdout , verbosity = 2 , failfast = failfast ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# runner = BasicTestRunner ( ) #NEWLINE# #UNINDENT# result = runner . run ( suite ) #NEWLINE# if ( not result . wasSuccessful ( ) ) : #NEWLINE# #INDENT# if ( ( len ( result . errors ) == 1 ) and ( not err . failures ) ) : #NEWLINE# #INDENT# err = result . errors [ 0 ] [ 1 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( len ( result . failures ) == 1 ) and ( not result . errors ) ) : #NEWLINE# #INDENT# err = result . failures [ 0 ] [ 1 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# err = 'multiple errors occurred' #NEWLINE# if ( not verbose ) : #NEWLINE# #INDENT# err += '; run in verbose mode for details' #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# raise TestFailed ( err )