'The reason argument passed to log.err() appears in the report
generated by DefaultObserver.'

def test_failureLogger(self):

    self.catcher = []
    self.observer = self.catcher.append
    log.addObserver(self.observer)
    self.addCleanup(log.removeObserver, self.observer)
    obs = log.DefaultObserver()
    obs.stderr = StringIO()
    obs.start()
    self.addCleanup(obs.stop)
    reason = 'The    reason.'
    log.err(Exception(), reason)
    errors = self.flushLoggedErrors()
    self.assertIn(reason, obs.stderr.getvalue())
    self.assertEqual(len(errors), 1)
