Known subclasses: twisted.trial.test.test_suppression.SynchronousSuppressionTests, twisted.trial.test.test_tests.AsynchronousSuppressionTests

Tests for the warning suppression features of twisted.trial.unittest.SynchronousTestCase.

Method runTests Undocumented
Method test_setUpSuppression Suppressions defined by the test method being run are applied to any warnings emitted while running the setUp fixture.
Method test_tearDownSuppression Suppressions defined by the test method being run are applied to any warnings emitted while running the tearDown fixture.
Method test_suppressMethod A suppression set on a test method prevents warnings emitted by that test method which the suppression matches from being emitted.
Method test_suppressClass A suppression set on a SynchronousTestCase subclass prevents warnings emitted by any test methods defined on that class which match the suppression from being emitted.
Method test_suppressModule A suppression set on a module prevents warnings emitted by any test mewthods defined in that module which match the suppression from being emitted.
Method test_overrideSuppressClass The suppression set on a test method completely overrides a suppression with wider scope; if it does not match a warning emitted by that test method, the warning is emitted, even if a wider suppression matches.
Method _load Return a new unittest.TestSuite with a single test method in it.
Method _assertWarnings Assert that a certain number of warnings with certain messages were emitted in a certain order.
def runTests(self, suite):
Undocumented
def _load(self, cls, methodName):

Return a new unittest.TestSuite with a single test method in it.

ParametersclsA TestCase subclass defining a test method.
methodNameThe name of the test method from cls.
def _assertWarnings(self, warnings, which):

Assert that a certain number of warnings with certain messages were emitted in a certain order.

ParameterswarningsA list of emitted warnings, as returned by flushWarnings.
whichA list of strings giving warning messages that should appear in warnings.
Raisesself.failureExceptionIf the warning messages given by which do not match the messages in the warning information in warnings, or if they do not appear in the same order.
def test_setUpSuppression(self):

Suppressions defined by the test method being run are applied to any warnings emitted while running the setUp fixture.

def test_tearDownSuppression(self):

Suppressions defined by the test method being run are applied to any warnings emitted while running the tearDown fixture.

def test_suppressMethod(self):

A suppression set on a test method prevents warnings emitted by that test method which the suppression matches from being emitted.

def test_suppressClass(self):

A suppression set on a SynchronousTestCase subclass prevents warnings emitted by any test methods defined on that class which match the suppression from being emitted.

def test_suppressModule(self):

A suppression set on a module prevents warnings emitted by any test mewthods defined in that module which match the suppression from being emitted.

def test_overrideSuppressClass(self):

The suppression set on a test method completely overrides a suppression with wider scope; if it does not match a warning emitted by that test method, the warning is emitted, even if a wider suppression matches.

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