'Cancelling a L{defer.DeferredList} will cancel every L{defer.Deferred}
in the list even exceptions raised from the C{cancel} method of the
L{defer.Deferred}s.'

def test_cancelDeferredListWithException(self):

    def cancellerRaisesException(deferred):
        '\n                                                A    L{defer.Deferred}    canceller    that    raises    an    exception.\n\n                                                @param    deferred:    The    cancelled    L{defer.Deferred}.\n                                                '
        raise RuntimeError('test')
    deferredOne = defer.Deferred(cancellerRaisesException)
    deferredTwo = defer.Deferred()
    deferredList = defer.DeferredList([deferredOne, deferredTwo])
    deferredList.cancel()
    self.failureResultOf(deferredTwo, defer.CancelledError)
    errors = self.flushLoggedErrors(RuntimeError)
    self.assertEqual(len(errors), 1)
