Skip to content

Instantly share code, notes, and snippets.

@terrycojones
Created August 27, 2013 01:50
Show Gist options
  • Save terrycojones/6348822 to your computer and use it in GitHub Desktop.
Save terrycojones/6348822 to your computer and use it in GitHub Desktop.
def testErrbackedDeferredFiresWithTheRightResult(self):
"""
The pool must correctly pass the original deferred errback result
through any callbacks it might have added.
"""
expectedValue = Exception()
pool = DeferredPool()
d = Deferred()
pool.add(d)
pool.notifyWhenEmpty()
d.errback(expectedValue)
self.assertIdentical(d.result.value, expectedValue)
self.assertFailure(d, Exception)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment