Known subclasses: twisted.trial.test.test_tests.AsynchronousAddCleanupTests, twisted.trial.test.test_tests.SynchronousAddCleanupTests

Test the addCleanup method of TestCase.

Method setUp Setup our test case
Method test_addCleanupCalledIfSetUpFails Callables added with addCleanup are run even if setUp fails.
Method test_addCleanupCalledIfSetUpSkips Callables added with addCleanup are run even if setUp raises SkipTest. This allows test authors to reliably provide clean up code using addCleanup.
Method test_addCleanupCalledInReverseOrder Callables added with addCleanup should be called before tearDown in reverse order of addition.
Method test_errorInCleanupIsCaptured Errors raised in cleanup functions should be treated like errors in tearDown. They should be added as errors and fail the test. Skips, todos and failures are all treated as errors.
Method test_cleanupsContinueRunningAfterError If a cleanup raises an error then that does not stop the other cleanups from being run.
Method test_multipleErrorsReported If more than one cleanup fails, then the test should fail with more than one error.
def setUp(self):

Setup our test case

def test_addCleanupCalledIfSetUpFails(self):

Callables added with addCleanup are run even if setUp fails.

def test_addCleanupCalledIfSetUpSkips(self):

Callables added with addCleanup are run even if setUp raises SkipTest. This allows test authors to reliably provide clean up code using addCleanup.

def test_addCleanupCalledInReverseOrder(self):

Callables added with addCleanup should be called before tearDown in reverse order of addition.

def test_errorInCleanupIsCaptured(self):

Errors raised in cleanup functions should be treated like errors in tearDown. They should be added as errors and fail the test. Skips, todos and failures are all treated as errors.

def test_cleanupsContinueRunningAfterError(self):

If a cleanup raises an error then that does not stop the other cleanups from being run.

def test_multipleErrorsReported(self):

If more than one cleanup fails, then the test should fail with more than one error.

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