#NEWLINE# def test_finishWithBadException( self ) : #NEWLINE# #INDENT# '\n        L{Action.finish} still logs a message if the given exception raises\n        another exception when called with C{unicode()}.\n        ' #NEWLINE# logger = MemoryLogger ( ) #NEWLINE# action = Action ( action , 'unique' , TaskLevel ( level = [ ] ) , 'sys:thename' ) #NEWLINE# class BadException ( Exception ) : #NEWLINE# #INDENT# def __str__( self ) : #NEWLINE# #INDENT# raise TypeError ( ) #NEWLINE# #UNINDENT# #UNINDENT# action . finish ( BadException ( ) ) #NEWLINE# self . assertEqual ( logger . messages [ 0 ] [ 'reason' ] , 'eliot: unknown, unicode() raised exception' )