'If a L{Deferred} in the list passed to L{gatherResults} fires with a
failure and C{consumerErrors} is C{True}, the failure is converted to a
L{None} result on that L{Deferred}.'

def test_gatherResultsWithConsumeErrors(self):

    dgood = defer.succeed(1)
    dbad = defer.fail(RuntimeError('oh    noes'))
    d = defer.gatherResults([dgood, dbad], consumeErrors=True)
    unconsumedErrors = []
    dbad.addErrback(unconsumedErrors.append)
    gatheredErrors = []
    d.addErrback(gatheredErrors.append)
    self.assertEqual((len(unconsumedErrors), len(gatheredErrors)), (0, 1))
    self.assertIsInstance(gatheredErrors[0].value, defer.FirstError)
    firstError = gatheredErrors[0].value.subFailure
    self.assertIsInstance(firstError.value, RuntimeError)
