class documentation

Undocumented

Method setUp Undocumented
Method test_addCallbacksNoneCallbackArgs If given None as a callback args and kwargs, () and {} are used.
Method test_addCallbacksNoneErrback If given None for an errback, addCallbacks uses a pass-through.
Method test_addCallbacksNoneErrbackArgs If given None as a errback args and kwargs, () and {} are used.
Method test_asynchronousImplicitChain If a first Deferred without a result is returned from a callback on a second Deferred, the result of the second Deferred becomes the result of the first Deferred as soon as the first Deferred has one and the result of the first ...
Method test_asynchronousImplicitErrorChain Let a and b be two Deferreds.
Method test_boundedStackDepth The depth of the call stack does not grow as more Deferred instances are chained together.
Method test_callbackMaybeReturnsFailure Callbacks passed to addCallback may return Failures.
Method test_callbackOrderPreserved A callback added to a Deferred after a previous callback attached another Deferred as a result is run after the callbacks of the other Deferred are run.
Method test_callbackReturnsDeferred Callbacks passed to Deferred.addCallback can return Deferreds and the next callback will not be run until that Deferred fires.
Method test_cancelDeferredList When cancelling an unfired DeferredList, cancel every Deferred in the list.
Method test_cancelDeferredListCallback When cancelling an unfired DeferredList without the fireOnOneCallback and fireOnOneErrback flags set, the DeferredList will be callback with a list of (success, result) tuples.
Method test_cancelDeferredListWithException Cancelling a DeferredList will cancel every Deferred in the list even exceptions raised from the cancel method of the Deferreds.
Method test_cancelDeferredListWithFireOnOneCallback When cancelling an unfired DeferredList with the flag fireOnOneCallback set, cancel every Deferred in the list.
Method test_cancelDeferredListWithFireOnOneCallbackAndDeferredCallback When cancelling an unfired DeferredList with the flag fireOnOneCallback set, if one of the Deferred callbacks in its canceller, the DeferredList will callback with the result and the index of the Deferred...
Method test_cancelDeferredListWithFireOnOneErrback When cancelling an unfired DeferredList with the flag fireOnOneErrback set, cancel every Deferred in the list.
Method test_cancelDeferredListWithFireOnOneErrbackAllDeferredsCallback When cancelling an unfired DeferredList with the flag fireOnOneErrback set, if all the Deferred callbacks in its canceller, the DeferredList will callback with a list of (success, result) tuples.
Method test_cancelDeferredListWithOriginalDeferreds Cancelling a DeferredList will cancel the original Deferreds passed in.
Method test_cancelFiredOnOneCallbackDeferredList When a DeferredList has fired because one Deferred in the list fired with a non-failure result, the cancellation will do nothing instead of cancelling the rest of the Deferreds.
Method test_cancelFiredOnOneErrbackDeferredList When a DeferredList has fired because one Deferred in the list fired with a failure result, the cancellation will do nothing instead of cancelling the rest of the Deferreds.
Method test_cancelGatherResults When cancelling the defer.gatherResults call, all the Deferreds in the list will be cancelled.
Method test_cancelGatherResultsWithAllDeferredsCallback When cancelling the defer.gatherResults call, if all the Deferreds callback in their canceller, the Deferred returned by defer.gatherResults will be callbacked with the list of the results.
Method test_canceller_circular_reference_callback A circular reference between a `Deferred` and its canceller is broken when the deferred is called.
Method test_canceller_circular_reference_errback A circular reference between a `Deferred` and its canceller is broken when the deferred fails.
Method test_canceller_circular_reference_non_final A circular reference between a `Deferred` and its canceller is broken when the deferred is called, even if another deferred gets added to its chain.
Method test_chainDeferredRecordsExplicitChain When we chain a Deferred, that chaining is recorded explicitly.
Method test_chainDeferredRecordsImplicitChain We can chain Deferreds implicitly by adding callbacks that return Deferreds. When this chaining happens, we record it explicitly as soon as we can find out about it.
Method test_chainedPausedDeferredWithResult When a paused Deferred with a result is returned from a callback on another Deferred, the other Deferred is chained to the first and waits for it to be unpaused.
Method test_circularChainException If the deprecation warning for circular deferred callbacks is configured to be an error, the exception will become the failure result of the Deferred.
Method test_circularChainWarning When a Deferred is returned from a callback directly attached to that same Deferred, a warning is emitted.
Method test_continueCallbackNotFirst The continue callback of a Deferred waiting for another Deferred is not necessarily the first one. This is somewhat a whitebox test checking that we search for that callback among the whole list of callbacks.
Method test_DEFERRED_SUBCLASSES _DEFERRED_SUBCLASSES includes all subclasses of Deferred.
Method test_doubleAsynchronousImplicitChaining Deferred chaining is transitive.
Method test_errbackReturnsDeferred Errbacks passed to Deferred.addErrback can return Deferreds just as callbacks can.
Method test_errbackWithNoArgs Deferred.errback() creates a failure from the current Python exception. When Deferred.debug is set globals and locals are captured in that failure.
Method test_errbackWithNoArgsNoDebug Deferred.errback() creates a failure from the current Python exception. When Deferred.debug is not set no globals or locals are captured in that failure.
Method test_errorInCallbackCapturesVarsWhenDebugging An error raised by a callback creates a Failure. The Failure captures locals and globals if and only if Deferred.debug is set.
Method test_errorInCallbackDoesNotCaptureVars An error raised by a callback creates a Failure. The Failure captures locals and globals if and only if Deferred.debug is set.
Method test_explicitChainClearedWhenResolved Any recorded chaining is cleared once the chaining is resolved, since it no longer exists.
Method test_fromCoroutine It can discover the return type of a first level coroutine.
Method test_fromCoroutineRequiresCoroutine Deferred.fromCoroutine requires a coroutine object or a generator, and will reject things that are not that.
Method test_gatherResults Undocumented
Method test_gatherResultsWithConsumeErrors If a Deferred in the list passed to gatherResults fires with a failure and consumerErrors is True, the failure is converted to a None result on that Deferred.
Method test_innerCallbacksPreserved When a Deferred encounters a result which is another Deferred which is waiting on a third Deferred, the middle Deferred's callbacks are executed after the third Deferred fires and before the first receives a result.
Method test_maybeDeferredAsync defer.maybeDeferred should let Deferred instance pass by so that original result is the same.
Method test_maybeDeferredAsyncError defer.maybeDeferred should let Deferred instance pass by so that Failure returned by the original instance is the same.
Method test_maybeDeferredCoroutineFailure When called with a coroutine function defer.maybeDeferred returns a defer.Deferred which has a Failure result wrapping the exception raised by the coroutine function.
Method test_maybeDeferredCoroutineSuccess When called with a coroutine function defer.maybeDeferred returns a defer.Deferred which has the same result as the coroutine returned by the function.
Method test_maybeDeferredCoroutineSuccessIndirect When called with a coroutine function defer.maybeDeferred returns a defer.Deferred which has the same result as the coroutine returned by the function.
Method test_maybeDeferredSync defer.maybeDeferred should retrieve the result of a synchronous function and pass it to its resulting Deferred.
Method test_maybeDeferredSyncException defer.maybeDeferred should catch an exception raised by a synchronous function and errback its resulting Deferred with it.
Method test_maybeDeferredSyncFailure defer.maybeDeferred should handle a Failure returned by a function and errback with it.
Method test_maybeDeferredSyncWithArgs defer.maybeDeferred should pass arguments to the called function.
Method test_nestedAsynchronousChainedDeferreds Deferreds can have callbacks that themselves return Deferreds. When these "inner" Deferreds fire (even asynchronously), the callback chain continues.
Method test_nestedAsynchronousChainedDeferredsWithExtraCallbacks Deferreds can have callbacks that themselves return Deferreds. These Deferreds can have other callbacks added before they are returned, which subtly changes the callback chain. When these "inner" Deferred...
Method test_nonReentrantCallbacks A callback added to a Deferred by a callback on that Deferred should not be executed until the running callback returns.
Method test_pausedDeferredChained A paused Deferred encountered while pushing a result forward through a chain does not prevent earlier Deferreds from continuing to execute their callbacks.
Method test_reentrantRunCallbacks A callback added to a Deferred by a callback on that Deferred should be added to the end of the callback chain.
Method test_reentrantRunCallbacksWithFailure After an exception is raised by a callback which was added to a Deferred by a callback on that Deferred, the Deferred should call the first errback with a Failure wrapping that exception.
Method test_repr The repr() of a Deferred contains the class name and a representation of the internal Python ID.
Method test_reprWithChaining If a Deferred a has been fired, but is waiting on another Deferred b that appears in its callback chain, then repr(a) says that it is waiting on b.
Method test_reprWithResult If a Deferred has been fired, then its repr() contains its result.
Method test_resultOfDeferredResultOfDeferredOfFiredDeferredCalled Given three Deferreds, one chained to the next chained to the next, callbacks on the middle Deferred which are added after the chain is created are called once the last Deferred fires.
Method test_succeedMatchesManualSuccess defer.succeed(x) is the same as as d = Deferred(); d.callback(x).
Method test_synchronousImplicitChain If a first Deferred with a result is returned from a callback on a second Deferred, the result of the second Deferred becomes the result of the first Deferred and the result of the first Deferred becomes ...
Method test_synchronousImplicitErrorChain If a first Deferred with a Failure result is returned from a callback on a second Deferred, the first Deferred's result is converted to None and no unhandled error is logged when it is garbage collected.
Method testCallbackErrors Undocumented
Method testCallbackWithArgs Undocumented
Method testCallbackWithKwArgs Undocumented
Method testCallbackWithoutArgs Undocumented
Method testDeferredList Undocumented
Method testDeferredListConsumeErrors Undocumented
Method testDeferredListDontConsumeErrors Undocumented
Method testDeferredListFireOnOneError Undocumented
Method testDeferredListFireOnOneErrorWithAlreadyFiredDeferreds Undocumented
Method testDeferredListWithAlreadyFiredDeferreds Undocumented
Method testEmptyDeferredList Undocumented
Method testImmediateFailure Undocumented
Method testImmediateSuccess Undocumented
Method testPausedFailure Undocumented
Method testTwoCallbacks Undocumented
Method testUnpauseBeforeCallback Undocumented
Instance Variable callback2Results Undocumented
Instance Variable callbackResults Undocumented
Instance Variable errbackResults Undocumented
Method _callback Undocumented
Method _callback2 Undocumented
Method _errback Undocumented

Inherited from SynchronousTestCase:

Method __eq__ Override the comparison defined by the base TestCase which considers instances of the same class with the same _testMethodName to be equal. Since trial puts TestCase instances into a set, that definition of comparison makes it impossible to run the same test method twice...
Method __hash__ Undocumented
Method __init__ Undocumented
Method addCleanup Add the given function to a list of functions to be called after the test has run, but before tearDown.
Method callDeprecated Call a function that should have been deprecated at a specific version and in favor of a specific alternative, and assert that it was thusly deprecated.
Method flushLoggedErrors Remove stored errors received from the log.
Method flushWarnings Remove stored warnings from the list of captured warnings and return them.
Method getDeprecatedModuleAttribute Retrieve a module attribute which should have been deprecated, and assert that we saw the appropriate deprecation warning.
Method getSkip Return the skip reason set on this test, if any is set. Checks on the instance first, then the class, then the module, then packages. As soon as it finds something with a skip attribute, returns that in a tuple (...
Method getTodo Return a Todo object if the test is marked todo. Checks on the instance first, then the class, then the module, then packages. As soon as it finds something with a todo attribute, returns that. Returns ...
Method mktemp Create a new path name which can be used for a new file or directory.
Method patch Monkey patch an object for the duration of the test.
Method run Run the test case, storing the results in result.
Method runTest If no methodName argument is passed to the constructor, run will treat this method as the thing with the actual test inside.
Method shortDescription Undocumented
Instance Variable failureException An exception class, defaulting to FailTest. If the test method raises this exception, it will be reported as a failure, rather than an exception. All of the assertion methods raise this if the assertion fails.
Instance Variable skip None or a string explaining why this test is to be skipped. If defined, the test will not be run. Instead, it will be reported to the result object as 'skipped' (if the TestResult supports skipping).
Instance Variable suppress None or a list of tuples of (args, kwargs) to be passed to warnings.filterwarnings. Use these to suppress warnings raised in a test. Useful for testing deprecated code. See also util.suppress.
Instance Variable todo None, a string or a tuple of (errors, reason) where errors is either an exception class or an iterable of exception classes, and reason is a string. See Todo or makeTodo for more information.
Method _getSkipReason Return the reason to use for skipping a test method.
Method _getSuppress Returns any warning suppressions set for this test. Checks on the instance first, then the class, then the module, then packages. As soon as it finds something with a suppress attribute, returns that. ...
Method _installObserver Undocumented
Method _removeObserver Undocumented
Method _run Run a single method, either a test method or fixture.
Method _runCleanups Synchronously run any cleanups which have been added.
Method _runFixturesAndTest Run setUp, a test method, test cleanups, and tearDown.
Instance Variable _cleanups Undocumented
Instance Variable _observer Undocumented
Instance Variable _parents Undocumented
Instance Variable _passed Undocumented
Instance Variable _testMethodName Undocumented
Instance Variable _warnings Undocumented

Inherited from _Assertions (via SynchronousTestCase):

Method assertAlmostEqual Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.
Method assertApproximates Fail if first - second > tolerance
Method assertEqual Fail the test if first and second are not equal.
Method assertFalse Fail the test if condition evaluates to True.
Method assertIn Fail the test if containee is not found in container.
Method assertIs Fail the test if first is not second. This is an obect-identity-equality test, not an object equality (i.e. __eq__) test.
Method assertIsInstance Fail if instance is not an instance of the given class or of one of the given classes.
Method assertIsNot Fail the test if first is second. This is an obect-identity-equality test, not an object equality (i.e. __eq__) test.
Method assertNoResult Assert that deferred does not have a result at this point.
Method assertNotAlmostEqual Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.
Method assertNotEqual Fail the test if first == second.
Method assertNotIn Fail the test if containee is found in container.
Method assertNotIsInstance Fail if instance is an instance of the given class or of one of the given classes.
Method assertNotSubstring Fail if astring contains substring.
Method assertRaises Fail the test unless calling the function f with the given args and kwargs raises exception. The failure will report the traceback and call stack of the unexpected exception.
Method assertSubstring Fail if substring does not exist within astring.
Method assertTrue Fail the test if condition evaluates to False.
Method assertWarns Fail if the given function doesn't generate the specified warning when called. It calls the function, checks the warning, and forwards the result of the function if everything is fine.
Method fail Absolutely fail the test. Do not pass go, do not collect $200.
Method failureResultOf Return the current failure result of deferred or raise self.failureException.
Method successResultOf Return the current success result of deferred or raise self.failureException.

Inherited from ImmediateFailureMixin (via SynchronousTestCase, _Assertions):

Method assertImmediateFailure Assert that the given Deferred current result is a Failure with the given exception.
def setUp(self):

Undocumented

def test_addCallbacksNoneCallbackArgs(self):

If given None as a callback args and kwargs, () and {} are used.

def test_addCallbacksNoneErrback(self):

If given None for an errback, addCallbacks uses a pass-through.

def test_addCallbacksNoneErrbackArgs(self):

If given None as a errback args and kwargs, () and {} are used.

def test_asynchronousImplicitChain(self):

If a first Deferred without a result is returned from a callback on a second Deferred, the result of the second Deferred becomes the result of the first Deferred as soon as the first Deferred has one and the result of the first Deferred becomes None.

def test_asynchronousImplicitErrorChain(self):

Let a and b be two Deferreds.

If a has no result and is returned from a callback on b then when a fails, b's result becomes the Failure that was a's result, the result of a becomes None so that no unhandled error is logged when it is garbage collected.

def test_boundedStackDepth(self):

The depth of the call stack does not grow as more Deferred instances are chained together.

def test_callbackMaybeReturnsFailure(self):

Callbacks passed to addCallback may return Failures.

def test_callbackOrderPreserved(self):

A callback added to a Deferred after a previous callback attached another Deferred as a result is run after the callbacks of the other Deferred are run.

def test_callbackReturnsDeferred(self):

Callbacks passed to Deferred.addCallback can return Deferreds and the next callback will not be run until that Deferred fires.

def test_cancelDeferredList(self):

When cancelling an unfired DeferredList, cancel every Deferred in the list.

def test_cancelDeferredListCallback(self):

When cancelling an unfired DeferredList without the fireOnOneCallback and fireOnOneErrback flags set, the DeferredList will be callback with a list of (success, result) tuples.

def test_cancelDeferredListWithException(self):

Cancelling a DeferredList will cancel every Deferred in the list even exceptions raised from the cancel method of the Deferreds.

def test_cancelDeferredListWithFireOnOneCallback(self):

When cancelling an unfired DeferredList with the flag fireOnOneCallback set, cancel every Deferred in the list.

def test_cancelDeferredListWithFireOnOneCallbackAndDeferredCallback(self):

When cancelling an unfired DeferredList with the flag fireOnOneCallback set, if one of the Deferred callbacks in its canceller, the DeferredList will callback with the result and the index of the Deferred in a tuple.

def test_cancelDeferredListWithFireOnOneErrback(self):

When cancelling an unfired DeferredList with the flag fireOnOneErrback set, cancel every Deferred in the list.

def test_cancelDeferredListWithFireOnOneErrbackAllDeferredsCallback(self):

When cancelling an unfired DeferredList with the flag fireOnOneErrback set, if all the Deferred callbacks in its canceller, the DeferredList will callback with a list of (success, result) tuples.

def test_cancelDeferredListWithOriginalDeferreds(self):

Cancelling a DeferredList will cancel the original Deferreds passed in.

def test_cancelFiredOnOneCallbackDeferredList(self):

When a DeferredList has fired because one Deferred in the list fired with a non-failure result, the cancellation will do nothing instead of cancelling the rest of the Deferreds.

def test_cancelFiredOnOneErrbackDeferredList(self):

When a DeferredList has fired because one Deferred in the list fired with a failure result, the cancellation will do nothing instead of cancelling the rest of the Deferreds.

def test_cancelGatherResults(self):

When cancelling the defer.gatherResults call, all the Deferreds in the list will be cancelled.

def test_cancelGatherResultsWithAllDeferredsCallback(self):

When cancelling the defer.gatherResults call, if all the Deferreds callback in their canceller, the Deferred returned by defer.gatherResults will be callbacked with the list of the results.

@pyunit.skipIf(_PYPY, 'GC works differently on PyPy.')
def test_canceller_circular_reference_callback(self):

A circular reference between a `Deferred` and its canceller is broken when the deferred is called.

@pyunit.skipIf(_PYPY, 'GC works differently on PyPy.')
def test_canceller_circular_reference_errback(self):

A circular reference between a `Deferred` and its canceller is broken when the deferred fails.

@pyunit.skipIf(_PYPY, 'GC works differently on PyPy.')
def test_canceller_circular_reference_non_final(self):

A circular reference between a `Deferred` and its canceller is broken when the deferred is called, even if another deferred gets added to its chain.

def test_chainDeferredRecordsExplicitChain(self):

When we chain a Deferred, that chaining is recorded explicitly.

def test_chainDeferredRecordsImplicitChain(self):

We can chain Deferreds implicitly by adding callbacks that return Deferreds. When this chaining happens, we record it explicitly as soon as we can find out about it.

def test_chainedPausedDeferredWithResult(self):

When a paused Deferred with a result is returned from a callback on another Deferred, the other Deferred is chained to the first and waits for it to be unpaused.

def test_circularChainException(self):

If the deprecation warning for circular deferred callbacks is configured to be an error, the exception will become the failure result of the Deferred.

def test_circularChainWarning(self):

When a Deferred is returned from a callback directly attached to that same Deferred, a warning is emitted.

def test_continueCallbackNotFirst(self):

The continue callback of a Deferred waiting for another Deferred is not necessarily the first one. This is somewhat a whitebox test checking that we search for that callback among the whole list of callbacks.

def test_DEFERRED_SUBCLASSES(self):

_DEFERRED_SUBCLASSES includes all subclasses of Deferred.

def test_doubleAsynchronousImplicitChaining(self):

Deferred chaining is transitive.

In other words, let A, B, and C be Deferreds. If C is returned from a callback on B and B is returned from a callback on A then when C fires, A fires.

def test_errbackReturnsDeferred(self):

Errbacks passed to Deferred.addErrback can return Deferreds just as callbacks can.

def test_errbackWithNoArgs(self):

Deferred.errback() creates a failure from the current Python exception. When Deferred.debug is set globals and locals are captured in that failure.

def test_errbackWithNoArgsNoDebug(self):

Deferred.errback() creates a failure from the current Python exception. When Deferred.debug is not set no globals or locals are captured in that failure.

def test_errorInCallbackCapturesVarsWhenDebugging(self):

An error raised by a callback creates a Failure. The Failure captures locals and globals if and only if Deferred.debug is set.

def test_errorInCallbackDoesNotCaptureVars(self):

An error raised by a callback creates a Failure. The Failure captures locals and globals if and only if Deferred.debug is set.

def test_explicitChainClearedWhenResolved(self):

Any recorded chaining is cleared once the chaining is resolved, since it no longer exists.

In other words, if one Deferred is recorded as depending on the result of another, and that Deferred has fired, then the dependency is resolved and we no longer benefit from recording it.

def test_fromCoroutine(self):

It can discover the return type of a first level coroutine.

def test_fromCoroutineRequiresCoroutine(self):

Deferred.fromCoroutine requires a coroutine object or a generator, and will reject things that are not that.

def test_gatherResults(self):

Undocumented

def test_gatherResultsWithConsumeErrors(self):

If a Deferred in the list passed to gatherResults fires with a failure and consumerErrors is True, the failure is converted to a None result on that Deferred.

def test_innerCallbacksPreserved(self):

When a Deferred encounters a result which is another Deferred which is waiting on a third Deferred, the middle Deferred's callbacks are executed after the third Deferred fires and before the first receives a result.

def test_maybeDeferredAsync(self):

defer.maybeDeferred should let Deferred instance pass by so that original result is the same.

def test_maybeDeferredAsyncError(self):

defer.maybeDeferred should let Deferred instance pass by so that Failure returned by the original instance is the same.

def test_maybeDeferredCoroutineFailure(self):

When called with a coroutine function defer.maybeDeferred returns a defer.Deferred which has a Failure result wrapping the exception raised by the coroutine function.

def test_maybeDeferredCoroutineSuccess(self):

When called with a coroutine function defer.maybeDeferred returns a defer.Deferred which has the same result as the coroutine returned by the function.

def test_maybeDeferredCoroutineSuccessIndirect(self):

When called with a coroutine function defer.maybeDeferred returns a defer.Deferred which has the same result as the coroutine returned by the function.

def test_maybeDeferredSync(self):

defer.maybeDeferred should retrieve the result of a synchronous function and pass it to its resulting Deferred.

def test_maybeDeferredSyncException(self):

defer.maybeDeferred should catch an exception raised by a synchronous function and errback its resulting Deferred with it.

def test_maybeDeferredSyncFailure(self):

defer.maybeDeferred should handle a Failure returned by a function and errback with it.

def test_maybeDeferredSyncWithArgs(self):

defer.maybeDeferred should pass arguments to the called function.

def test_nestedAsynchronousChainedDeferreds(self):

Deferreds can have callbacks that themselves return Deferreds. When these "inner" Deferreds fire (even asynchronously), the callback chain continues.

def test_nestedAsynchronousChainedDeferredsWithExtraCallbacks(self):

Deferreds can have callbacks that themselves return Deferreds. These Deferreds can have other callbacks added before they are returned, which subtly changes the callback chain. When these "inner" Deferreds fire (even asynchronously), the outer callback chain continues.

def test_nonReentrantCallbacks(self):

A callback added to a Deferred by a callback on that Deferred should not be executed until the running callback returns.

def test_pausedDeferredChained(self):

A paused Deferred encountered while pushing a result forward through a chain does not prevent earlier Deferreds from continuing to execute their callbacks.

def test_reentrantRunCallbacks(self):

A callback added to a Deferred by a callback on that Deferred should be added to the end of the callback chain.

def test_reentrantRunCallbacksWithFailure(self):

After an exception is raised by a callback which was added to a Deferred by a callback on that Deferred, the Deferred should call the first errback with a Failure wrapping that exception.

def test_repr(self):

The repr() of a Deferred contains the class name and a representation of the internal Python ID.

def test_reprWithChaining(self):

If a Deferred a has been fired, but is waiting on another Deferred b that appears in its callback chain, then repr(a) says that it is waiting on b.

def test_reprWithResult(self):

If a Deferred has been fired, then its repr() contains its result.

def test_resultOfDeferredResultOfDeferredOfFiredDeferredCalled(self):

Given three Deferreds, one chained to the next chained to the next, callbacks on the middle Deferred which are added after the chain is created are called once the last Deferred fires.

This is more of a regression-style test. It doesn't exercise any particular code path through the current implementation of Deferred, but it does exercise a broken codepath through one of the variations of the implementation proposed as a resolution to ticket #411.

def test_succeedMatchesManualSuccess(self):

defer.succeed(x) is the same as as d = Deferred(); d.callback(x).

def test_synchronousImplicitChain(self):

If a first Deferred with a result is returned from a callback on a second Deferred, the result of the second Deferred becomes the result of the first Deferred and the result of the first Deferred becomes None.

def test_synchronousImplicitErrorChain(self):

If a first Deferred with a Failure result is returned from a callback on a second Deferred, the first Deferred's result is converted to None and no unhandled error is logged when it is garbage collected.

def testCallbackErrors(self):

Undocumented

def testCallbackWithArgs(self):

Undocumented

def testCallbackWithKwArgs(self):

Undocumented

def testCallbackWithoutArgs(self):

Undocumented

def testDeferredList(self):

Undocumented

def testDeferredListConsumeErrors(self):

Undocumented

def testDeferredListDontConsumeErrors(self):

Undocumented

def testDeferredListFireOnOneError(self):

Undocumented

def testDeferredListFireOnOneErrorWithAlreadyFiredDeferreds(self):

Undocumented

def testDeferredListWithAlreadyFiredDeferreds(self):

Undocumented

def testEmptyDeferredList(self):

Undocumented

def testImmediateFailure(self):

Undocumented

def testImmediateSuccess(self):

Undocumented

def testPausedFailure(self):

Undocumented

def testTwoCallbacks(self):

Undocumented

def testUnpauseBeforeCallback(self):

Undocumented

callback2Results: tuple[tuple[object, ...], dict[str, object]] | None =

Undocumented

callbackResults: tuple[tuple[object, ...], dict[str, object]] | None =

Undocumented

errbackResults: tuple[tuple[Failure, ...], dict[str, object]] | None =

Undocumented

def _callback(self, *args: object, **kwargs: object) -> Any:

Undocumented

def _callback2(self, *args: object, **kwargs: object):

Undocumented

def _errback(self, *args: Failure, **kwargs: object):

Undocumented