twisted.trial.test.test_tests.TestDecoratorMixin(object)
class documentationtwisted.trial.test.test_tests
(View In Hierarchy)
Known subclasses: twisted.trial.test.test_tests.AsynchronousTestDecoratorTests, twisted.trial.test.test_tests.SynchronousTestDecoratorTests
Tests for our test decoration features.
Method | assertTestsEqual | Assert that the given decorated tests are equal. |
Method | assertSuitesEqual | Assert that the given test suites with decorated tests are equal. |
Method | test_usesAdaptedReporterWithRun | For decorated tests, run uses a result adapter that
preserves the test decoration for calls to addError ,
startTest and the like. |
Method | test_usesAdaptedReporterWithCall | For decorated tests, __call__ uses a result adapter that
preserves the test decoration for calls to addError ,
startTest and the like. |
Method | test_decorateSingleTest | Calling decorate on a
single test case returns the test case decorated with the provided
decorator. |
Method | test_decorateTestSuite | Calling decorate on a
test suite will return a test suite with each test decorated with the
provided decorator. |
Method | test_decorateInPlaceMutatesOriginal | Calling decorate on a
test suite will mutate the original suite. |
Method | test_decorateTestSuiteReferences | When decorating a test suite in-place, the number of references to the test objects in that test suite should stay the same. |
Method | test_decorateNestedTestSuite | Calling decorate on a
test suite with nested suites will return a test suite that maintains the
same structure, but with all tests decorated. |
Method | test_decorateDecoratedSuite | Calling decorate on a
test suite with already-decorated tests decorates all of the tests in the
suite again. |
Method | test_decoratePreservesSuite | Tests can be in non-standard suites. decorate
preserves the non-standard suites when it decorates the tests. |
Assert that the given test suites with decorated tests are equal.
For decorated tests, run
uses a result adapter that
preserves the test decoration for calls to addError
,
startTest
and the like.
See reporter._AdaptedReporter
.
For decorated tests, __call__
uses a result adapter that
preserves the test decoration for calls to addError
,
startTest
and the like.
See reporter._AdaptedReporter
.
Calling decorate
on a
single test case returns the test case decorated with the provided
decorator.
Calling decorate
on a
test suite will return a test suite with each test decorated with the
provided decorator.
Calling decorate
on a
test suite will mutate the original suite.
When decorating a test suite in-place, the number of references to the test objects in that test suite should stay the same.
Previously, unittest.decorate
recreated a test suite, so the original suite kept references to the test
objects. This test is here to ensure the problem doesn't reappear
again.
Calling decorate
on a
test suite with nested suites will return a test suite that maintains the
same structure, but with all tests decorated.
Calling decorate
on a
test suite with already-decorated tests decorates all of the tests in the
suite again.
Tests can be in non-standard suites. decorate
preserves the non-standard suites when it decorates the tests.