def test_cancelGatherResults(self):
        """
        When cancelling the L{defer.gatherResults} call, all the
        L{defer.Deferred}s in the list will be cancelled.
        """
        deferredOne = defer.Deferred()
        deferredTwo = defer.Deferred()
        result = defer.gatherResults([deferredOne, deferredTwo])
        result.cancel()
        self.failureResultOf(deferredOne, defer.CancelledError)
        self.failureResultOf(deferredTwo, defer.CancelledError)
        gatherResultsFailure = self.failureResultOf(result, defer.FirstError)
        firstError = gatherResultsFailure.value
        self.assertTrue(firstError.subFailure.check(defer.CancelledError))

        When cancelling the L{defer.gatherResults} call, all the
        L{defer.Deferred}s in the list will be cancelled.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_defer.py