twisted.test.test_defgen.BaseDefgenTests
class documentationtwisted.test.test_defgen
(View In Hierarchy)
Known subclasses: twisted.test.test_defgen.DeferredGeneratorTests, twisted.test.test_defgen.InlineCallbacksTests
This class sets up a bunch of test cases which will test both deferredGenerator and inlineCallbacks based generators. The subclasses DeferredGeneratorTests and InlineCallbacksTests each provide the actual generator implementations tested.
Method | testBasics | Test that a normal deferredGenerator works. Tests yielding a deferred which callbacks, as well as a deferred errbacks. Also ensures returning a final value works. |
Method | testBuggy | Ensure that a buggy generator properly signals a Failure condition on result deferred. |
Method | testNothing | Test that a generator which never yields results in None. |
Method | testHandledTerminalFailure | Create a Deferred Generator which yields a Deferred which fails and handles the exception which results. Assert that the Deferred Generator does not errback its Deferred. |
Method | testHandledTerminalAsyncFailure | Just like testHandledTerminalFailure, only with a Deferred which fires asynchronously with an error. |
Method | testStackUsage | Make sure we don't blow the stack when yielding immediately available deferreds. |
Method | testStackUsage2 | Make sure we don't blow the stack when yielding immediately available values. |
Test that a normal deferredGenerator works. Tests yielding a deferred which callbacks, as well as a deferred errbacks. Also ensures returning a final value works.
Ensure that a buggy generator properly signals a Failure condition on result deferred.
Create a Deferred Generator which yields a Deferred which fails and handles the exception which results. Assert that the Deferred Generator does not errback its Deferred.
Just like testHandledTerminalFailure, only with a Deferred which fires asynchronously with an error.