class documentation
class AddCleanupMixin:
Known subclasses: twisted.trial.test.test_tests.AsynchronousAddCleanupTests
, twisted.trial.test.test_tests.SynchronousAddCleanupTests
Test the addCleanup method of TestCase.
Method | set |
Setup our test case |
Method | test_add |
Callables added with addCleanup are run even if setUp fails. |
Method | test_add |
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_add |
Callables added with addCleanup should be called before tearDown in reverse order of addition. |
Method | test_cleanup |
A function registered as a cleanup is run once. |
Method | test_cleanups |
If a cleanup raises an error then that does not stop the other cleanups from being run. |
Method | test_error |
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_multiple |
If more than one cleanup fails, then the test should fail with more than one error. |
Instance Variable | result |
Undocumented |
Instance Variable | test |
Undocumented |
Callables added with addCleanup are run even if setUp raises SkipTest
. This allows test authors to reliably provide clean up code using addCleanup.
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.