Tests for the behaviour of unit tests.
Many tests in this module follow a simple pattern. A mixin is defined which includes test methods for a certain feature. The mixin is inherited from twice, once by a class also inheriting from SynchronousTestCase and once from a class inheriting from TestCase. These two subclasses are named like SynchronousFooTests and AsynchronousFooTests, where Foo is related to the name of the mixin. Sometimes the mixin is defined in another module, along with the synchronous subclass. The mixin is imported into this module to define the asynchronous subclass.
This pattern allows the same tests to be applied to the two base test case classes trial provides, ensuring their behavior is the same.
Most new tests should be added in this pattern. Tests for functionality which is intentionally only provided by TestCase, not SynchronousTestCase, is excepted of course.
Class | ResultsTestMixin | Provide useful APIs for test cases that are about test cases. |
Class | SuccessMixin | Tests for the reporting of successful tests in twisted.trial.unittest.TestCase . |
Class | SynchronousSuccessTests | Tests for the reporting of successful tests in the synchronous case. |
Class | AsynchronousSuccessTests | Tests for the reporting of successful tests in the synchronous case. |
Class | SkipMethodsMixin | Tests for the reporting of skipping tests in twisted.trial.unittest.TestCase . |
Class | SynchronousSkipMethodTests | Tests for the reporting of skipping tests in the synchronous case. |
Class | AsynchronousSkipMethodTests | Tests for the reporting of skipping tests in the asynchronous case. |
Class | SkipClassesMixin | Test the class skipping features of twisted.trial.unittest.TestCase . |
Class | SynchronousSkipClassTests | Test the class skipping features in the synchronous case. |
Class | AsynchronousSkipClassTests | Test the class skipping features in the asynchronous case. |
Class | TodoMixin | Tests for the individual test method expected failure features of
twisted.trial.unittest.TestCase . |
Class | SynchronousTodoTests | Test the class skipping features in the synchronous case. |
Class | AsynchronousTodoTests | Test the class skipping features in the asynchronous case. |
Class | ClassTodoMixin | Tests for the class-wide expected failure features of twisted.trial.unittest.TestCase . |
Class | SynchronousClassTodoTests | Tests for the class-wide expected failure features in the synchronous case. |
Class | AsynchronousClassTodoTests | Tests for the class-wide expected failure features in the asynchronous case. |
Class | StrictTodoMixin | Tests for the expected failure features of twisted.trial.unittest.TestCase
in which the exact failure which is expected is indicated. |
Class | SynchronousStrictTodoTests | Tests for the expected failure case when the exact failure that is expected is indicated in the synchronous case |
Class | AsynchronousStrictTodoTests | Tests for the expected failure case when the exact failure that is expected is indicated in the asynchronous case |
Class | ReactorCleanupTests | Tests for cleanup and reporting of reactor event sources left behind by test methods. |
Class | FixtureMixin | Tests for fixture helper methods (e.g. setUp, tearDown). |
Class | SynchronousFixtureTests | Tests for broken fixture helper methods in the synchronous case |
Class | AsynchronousFixtureTests | Tests for broken fixture helper methods in the asynchronous case |
Class | AsynchronousSuppressionTests | Tests for the warning suppression features of twisted.trial.unittest.TestCase |
Class | GCMixin | I provide a few mock tests that log setUp, tearDown, test execution and garbage collection. I'm used to test whether gc.collect gets called. |
Class | GarbageCollectionDefaultTests | By default, tests should not force garbage collection. |
Class | GarbageCollectionTests | Test that, when force GC, it works. |
Class | UnhandledDeferredTests | Test what happens when we have an unhandled deferred left around after a test. |
Class | AddCleanupMixin | Test the addCleanup method of TestCase. |
Class | SynchronousAddCleanupTests | Test the addCleanup method of TestCase in the synchronous case |
Class | AsynchronousAddCleanupTests | Test the addCleanup method of TestCase in the asynchronous case |
Class | SuiteClearingMixin | Tests for our extension that allows us to clear out a TestSuite . |
Class | SynchronousSuiteClearingTests | Tests for our extension that allows us to clear out a TestSuite in
the synchronous case. |
Class | AsynchronousSuiteClearingTests | Tests for our extension that allows us to clear out a TestSuite in
the asynchronous case. |
Class | TestDecoratorMixin | Tests for our test decoration features. |
Class | SynchronousTestDecoratorTests | Tests for our test decoration features in the synchronous case. |
Class | AsynchronousTestDecoratorTests | Tests for our test decoration features in the asynchronous case. |
Class | MonkeyPatchMixin | Tests for the patch() helper method in unittest.TestCase . |
Class | SynchronousMonkeyPatchTests | Tests for the patch() helper method in the synchronous case. |
Class | AsynchronousMonkeyPatchTests | Tests for the patch() helper method in the asynchronous case. |
Class | IterateTestsMixin | _iterateTests
returns a list of all test cases in a test suite or test case. |
Class | SynchronousIterateTestsTests | Check that _iterateTests
returns a list of all test cases in a test suite or test case for
synchronous tests. |
Class | AsynchronousIterateTestsTests | Check that _iterateTests
returns a list of all test cases in a test suite or test case for
asynchronous tests. |
Class | TrialGeneratorFunctionTests | Tests for generator function methods in test cases. |