twisted.trial.test.test_tests.AddCleanupMixin(object) class documentationtwisted.trial.test.test_tests
(View In Hierarchy)
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. |
Callables added with addCleanup are run even if setUp
fails.
Callables added with addCleanup are run even if setUp
raises SkipTest. This allows test authors to reliably provide
clean up code using addCleanup.
Callables added with addCleanup should be called before
tearDown in reverse order of addition.
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.