#NEWLINE# def test_tracebacks( self ) : #NEWLINE# #INDENT# @ patch . object ( Foo , 'f' , object ( ) ) #NEWLINE# def test( ) : #NEWLINE# #INDENT# raise AssertionError #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# test ( ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# err = sys . exc_info ( ) #NEWLINE# #UNINDENT# result = unittest . TextTestResult ( None , None , 0 ) #NEWLINE# traceback = result . _exc_info_to_string ( err , self ) #NEWLINE# self . assertIn ( 'raise AssertionError' , traceback )