#NEWLINE# def test_log_errors( self ) : #NEWLINE# #INDENT# '\n        Registered functions that raise an error have the error logged, and\n        run() continues processing.\n        ' #NEWLINE# result = [ ] #NEWLINE# registry = FunctionRegistry ( ) #NEWLINE# registry . register ( ( lambda : result . append ( 2 ) ) ) #NEWLINE# registry . register ( ( lambda : ( 1 / 0 ) ) ) #NEWLINE# registry . register ( ( lambda : result . append ( 1 ) ) ) #NEWLINE# registry . run ( ) #NEWLINE# self . assertEqual ( result , [ 1 , 2 ] ) #NEWLINE# excs = self . flushLoggedErrors ( ZeroDivisionError ) #NEWLINE# self . assertEqual ( len ( excs ) , 1 )