#NEWLINE# def test_pyunitAddError( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# raise RuntimeError ( 'foo' ) #NEWLINE# #UNINDENT# except RuntimeError as e : #NEWLINE# #INDENT# excValue = e #NEWLINE# self . result . addError ( self , sys . exc_info ( ) ) #NEWLINE# #UNINDENT# failure = self . result . errors [ 0 ] [ 1 ] #NEWLINE# self . assertEqual ( excValue , failure . value ) #NEWLINE# self . assertEqual ( RuntimeError , failure . type )