#NEWLINE# @ capture_logging ( None ) #NEWLINE# def test_logging( self , logger ) : #NEWLINE# #INDENT# '\n        Failures in the supplied ``deferreds`` are all logged.\n        ' #NEWLINE# expected_failure1 = Failure ( ZeroDivisionError ( 'test_logging1' ) ) #NEWLINE# expected_failure2 = Failure ( ZeroDivisionError ( 'test_logging2' ) ) #NEWLINE# self . failureResultOf ( gather_deferreds ( [ fail ( expected_failure1 ) , fail ( expected_failure2 ) ] ) ) #NEWLINE# failures = logger . flush_tracebacks ( ZeroDivisionError ) #NEWLINE# self . assertEqual ( [ expected_failure1 . value , expected_failure2 . value ] , list ( ( failure [ 'reason' ] for failure in failures ) ) )