'If one Deferred with an error result is returned from a callback on
another Deferred, when the first Deferred is garbage collected it does
not log its error.'

def test_chainedErrorCleanup(self):

    d = defer.Deferred()
    d.addCallback((lambda ign: defer.fail(RuntimeError('zoop'))))
    d.callback(None)
    results = []
    errors = []
    d.addCallbacks(results.append, errors.append)
    self.assertEqual(results, [])
    self.assertEqual(len(errors), 1)
    errors[0].trap(Exception)
    del results, errors, d
    gc.collect()
    self.assertEqual(self._loggedErrors(), [])
