No class docstring
Method setUp Undocumented
Method testCallbackWithoutArgs Undocumented
Method testCallbackWithArgs Undocumented
Method testCallbackWithKwArgs Undocumented
Method testTwoCallbacks Undocumented
Method testDeferredList Undocumented
Method testEmptyDeferredList Undocumented
Method testDeferredListFireOnOneError Undocumented
Method testDeferredListDontConsumeErrors Undocumented
Method testDeferredListConsumeErrors Undocumented
Method testDeferredListFireOnOneErrorWithAlreadyFiredDeferreds Undocumented
Method testDeferredListWithAlreadyFiredDeferreds Undocumented
Method test_cancelDeferredList When cancelling an unfired defer.DeferredList, cancel every defer.Deferred in the list.
Method test_cancelDeferredListCallback No summary
Method test_cancelDeferredListWithFireOnOneCallback When cancelling an unfired defer.DeferredList with the flag fireOnOneCallback set, cancel every defer.Deferred in the list.
Method test_cancelDeferredListWithFireOnOneCallbackAndDeferredCallback No summary
Method test_cancelDeferredListWithFireOnOneErrback When cancelling an unfired defer.DeferredList with the flag fireOnOneErrback set, cancel every defer.Deferred in the list.
Method test_cancelDeferredListWithFireOnOneErrbackAllDeferredsCallback No summary
Method test_cancelDeferredListWithOriginalDeferreds Cancelling a defer.DeferredList will cancel the original defer.Deferreds passed in.
Method test_cancelDeferredListWithException Cancelling a defer.DeferredList will cancel every defer.Deferred in the list even exceptions raised from the cancel method of the defer.Deferreds.
Method test_cancelFiredOnOneCallbackDeferredList When a defer.DeferredList has fired because one defer.Deferred in the list fired with a non-failure result, the cancellation will do nothing instead of cancelling the rest of the defer.Deferreds.
Method test_cancelFiredOnOneErrbackDeferredList When a defer.DeferredList has fired because one defer.Deferred in the list fired with a failure result, the cancellation will do nothing instead of cancelling the rest of the defer.Deferreds.
Method testImmediateSuccess Undocumented
Method testImmediateFailure Undocumented
Method testPausedFailure Undocumented
Method testCallbackErrors Undocumented
Method testUnpauseBeforeCallback Undocumented
Method testReturnDeferred Undocumented
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_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_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_cancelGatherResults When cancelling the defer.gatherResults call, all the defer.Deferreds in the list will be cancelled.
Method test_cancelGatherResultsWithAllDeferredsCallback No summary
Method test_maybeDeferredSync defer.maybeDeferred should retrieve the result of a synchronous function and pass it to its resulting defer.Deferred.
Method test_maybeDeferredSyncError defer.maybeDeferred should catch exception raised by a synchronous function and errback its resulting defer.Deferred with it.
Method test_maybeDeferredAsync defer.maybeDeferred should let defer.Deferred instance pass by so that original result is the same.
Method test_maybeDeferredAsyncError defer.maybeDeferred should let defer.Deferred instance pass by so that failure.Failure returned by the original instance is the same.
Method test_innerCallbacksPreserved No summary
Method test_continueCallbackNotFirst No summary
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_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_nonReentrantCallbacks A callback added to a Deferred by a callback on that Deferred should not be executed until the running callback returns.
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_synchronousImplicitChain No summary
Method test_asynchronousImplicitChain No summary
Method test_synchronousImplicitErrorChain No summary
Method test_asynchronousImplicitErrorChain Let a and b be two Deferreds.
Method test_doubleAsynchronousImplicitChaining Deferred chaining is transitive.
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 No summary
Method test_chainDeferredRecordsExplicitChain When we chain a Deferred, that chaining is recorded explicitly.
Method test_explicitChainClearedWhenResolved Any recorded chaining is cleared once the chaining is resolved, since it no longer exists.
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_circularChainWarning When a Deferred is returned from a callback directly attached to that same Deferred, a warning is emitted.
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_repr The repr() of a Deferred contains the class name and a representation of the internal Python ID.
Method test_reprWithResult If a Deferred has been fired, then its repr() contains its result.
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_boundedStackDepth The depth of the call stack does not grow as more Deferred instances are chained together.
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_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_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_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_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_inlineCallbacksTracebacks defer.inlineCallbacks that re-raise tracebacks into their deferred should not lose their tracebacks.
Method _callback Undocumented
Method _callback2 Undocumented
Method _errback Undocumented

Inherited from SynchronousTestCase:

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 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.
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.
Method __init__ Undocumented
Method __eq__ No summary
Method __ne__ Undocumented
Method __hash__ Undocumented
Method shortDescription Undocumented
Method getSkip No summary
Method getTodo No summary
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 run Run the test case, storing the results in result.
Method addCleanup Add the given function to a list of functions to be called after the test has run, but before tearDown.
Method patch Monkey patch an object for the duration of the test.
Method flushLoggedErrors Remove stored errors received from the log.
Method flushWarnings Remove stored warnings from the list of captured warnings and return them.
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 mktemp Create a new path name which can be used for a new file or directory.
Method _getSuppress No summary
Method _getSkipReason Return the reason to use for skipping a test method.
Method _run Run a single method, either a test method or fixture.
Method _runFixturesAndTest Run setUp, a test method, test cleanups, and tearDown.
Method _runCleanups Synchronously run any cleanups which have been added.
Method _installObserver Undocumented
Method _removeObserver Undocumented

Inherited from _Assertions (via SynchronousTestCase):

Method fail Absolutely fail the test. Do not pass go, do not collect $200.
Method assertFalse Fail the test if condition evaluates to True.
Method assertTrue Fail the test if condition evaluates to False.
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 assertEqual Fail the test if first and second are not equal.
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 assertIsNot Fail the test if first is second. This is an obect-identity-equality test, not an object equality (i.e. __eq__) test.
Method assertNotEqual Fail the test if first == second.
Method assertIn Fail the test if containee is not found in container.
Method assertNotIn Fail the test if containee is found in container.
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 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 assertSubstring Fail if substring does not exist within astring.
Method assertNotSubstring Fail if astring contains substring.
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 assertIsInstance Fail if instance is not an instance of the given class or of one of the given classes.
Method assertNotIsInstance Fail if instance is an instance of the given class or of one of the given classes.
Method successResultOf Return the current success result of deferred or raise self.failureException.
Method failureResultOf Return the current failure result of deferred or raise self.failureException.
Method assertNoResult Assert that deferred does not have a result at this point.
Method assertRegex Fail the test if a regexp search of text fails.

Inherited from ImmediateFailureMixin:

Method assertImmediateFailure Assert that the given Deferred current result is a Failure with the given exception.
def setUp(self):
Undocumented
def _callback(self, *args, **kw):
Undocumented
def _callback2(self, *args, **kw):
Undocumented
def _errback(self, *args, **kw):
Undocumented
def testCallbackWithoutArgs(self):
Undocumented
def testCallbackWithArgs(self):
Undocumented
def testCallbackWithKwArgs(self):
Undocumented
def testTwoCallbacks(self):
Undocumented
def testDeferredList(self):
Undocumented
def testEmptyDeferredList(self):
Undocumented
def testDeferredListFireOnOneError(self):
Undocumented
def testDeferredListDontConsumeErrors(self):
Undocumented
def testDeferredListConsumeErrors(self):
Undocumented
def testDeferredListFireOnOneErrorWithAlreadyFiredDeferreds(self):
Undocumented
def testDeferredListWithAlreadyFiredDeferreds(self):
Undocumented
def test_cancelDeferredList(self):

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

def test_cancelDeferredListCallback(self):

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

def test_cancelDeferredListWithFireOnOneCallback(self):

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

def test_cancelDeferredListWithFireOnOneCallbackAndDeferredCallback(self):

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

def test_cancelDeferredListWithFireOnOneErrback(self):

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

def test_cancelDeferredListWithFireOnOneErrbackAllDeferredsCallback(self):

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

def test_cancelDeferredListWithOriginalDeferreds(self):

Cancelling a defer.DeferredList will cancel the original defer.Deferreds passed in.

def test_cancelDeferredListWithException(self):

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

def test_cancelFiredOnOneCallbackDeferredList(self):

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

def test_cancelFiredOnOneErrbackDeferredList(self):

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

def testImmediateSuccess(self):
Undocumented
def testImmediateFailure(self):
Undocumented
def testPausedFailure(self):
Undocumented
def testCallbackErrors(self):
Undocumented
def testUnpauseBeforeCallback(self):
Undocumented
def testReturnDeferred(self):
Undocumented
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_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_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_cancelGatherResults(self):

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

def test_cancelGatherResultsWithAllDeferredsCallback(self):

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

def test_maybeDeferredSync(self):

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

def test_maybeDeferredSyncError(self):

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

def test_maybeDeferredAsync(self):

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

def test_maybeDeferredAsyncError(self):

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

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_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_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_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_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_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_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_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_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 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_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_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_chainDeferredRecordsExplicitChain(self):

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

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_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_circularChainWarning(self):

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

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_repr(self):

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

def test_reprWithResult(self):

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

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_boundedStackDepth(self):

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

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_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_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_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_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_inlineCallbacksTracebacks(self):

defer.inlineCallbacks that re-raise tracebacks into their deferred should not lose their tracebacks.

API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.