'If the C{"log_failure"} key exists in an event, and contains an object
that raises when you call its C{getTraceback()}, then the observer
appends a message noting the problem, instead of raising.'

def test_observeFailureThatRaisesInGetTraceback(self):

    with StringIO() as fileHandle:
        observer = textFileLogObserver(fileHandle)
        event = dict(log_failure=object())
        observer(event)
        output = fileHandle.getvalue()
        expected = '(UNABLE    TO    OBTAIN    TRACEBACK    FROM    EVENT)'
        self.assertIn(expected, output)
