'Failures in the supplied ``deferreds`` are logged immediately.'

@capture_logging(None)
def test_errors_logged_immediately(self, logger):

    d1 = Deferred()
    d2 = Deferred()
    gathering = gather_deferreds([d1, d2])
    expected_error = ZeroDivisionError()
    d1.errback(expected_error)
    logged_errors = logger.flush_tracebacks(ZeroDivisionError)
    self.assertEqual([expected_error], list((f['reason'] for f in logged_errors)))
    d2.callback(None)
    self.failureResultOf(gathering)
