#NEWLINE# def test_exceptionTodo( self ) : #NEWLINE# #INDENT# '\n        The exception for expected failures should be shown in the\n        C{printErrors} output.\n        ' #NEWLINE# try : #NEWLINE# #INDENT# ( 1 / 0 ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# error = e #NEWLINE# #UNINDENT# self . result . addExpectedFailure ( self . test , Failure ( error ) , makeTodo ( 'todo!' ) ) #NEWLINE# self . result . done ( ) #NEWLINE# output = '\n' . join ( self . stream . getvalue ( ) . splitlines ( ) [ 3 : ] ) . strip ( ) #NEWLINE# self . assertTrue ( ( str ( error ) in output ) )