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.
def assertTestsEqual(self, observed, expected):

Assert that the given decorated tests are equal.

def assertSuitesEqual(self, observed, expected):

Assert that the given test suites with decorated tests are equal.

def test_usesAdaptedReporterWithRun(self):

For decorated tests, run uses a result adapter that preserves the test decoration for calls to addError, startTest and the like.

See reporter._AdaptedReporter.

def test_usesAdaptedReporterWithCall(self):

For decorated tests, __call__ uses a result adapter that preserves the test decoration for calls to addError, startTest and the like.

See reporter._AdaptedReporter.

def test_decorateSingleTest(self):

Calling decorate on a single test case returns the test case decorated with the provided decorator.

def test_decorateTestSuite(self):

Calling decorate on a test suite will return a test suite with each test decorated with the provided decorator.

def test_decorateInPlaceMutatesOriginal(self):

Calling decorate on a test suite will mutate the original suite.

def test_decorateTestSuiteReferences(self):

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.

def test_decorateNestedTestSuite(self):

Calling decorate on a test suite with nested suites will return a test suite that maintains the same structure, but with all tests decorated.

def test_decorateDecoratedSuite(self):

Calling decorate on a test suite with already-decorated tests decorates all of the tests in the suite again.

def test_decoratePreservesSuite(self):

Tests can be in non-standard suites. decorate preserves the non-standard suites when it decorates the tests.

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