class documentation

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

Method runTests Undocumented
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 test_setUpSuppression Suppressions defined by the test method being run are applied to any warnings emitted while running the setUp fixture.
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_suppressMethod A suppression set on a test method prevents warnings emitted by that test method which the suppression matches 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_tearDownSuppression Suppressions defined by the test method being run are applied to any warnings emitted while running the tearDown fixture.
Method _assertWarnings Assert that a certain number of warnings with certain messages were emitted in a certain order.
Method _load Return a new unittest.TestSuite with a single test method in it.
def runTests(self, suite): (source)

Undocumented

def test_overrideSuppressClass(self): (source)

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.

def test_setUpSuppression(self): (source)

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

def test_suppressClass(self): (source)

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_suppressMethod(self): (source)

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

def test_suppressModule(self): (source)

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_tearDownSuppression(self): (source)

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

def _assertWarnings(self, warnings, which): (source)

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

Parameters
warningsA list of emitted warnings, as returned by flushWarnings.
whichA list of strings giving warning messages that should appear in warnings.
Raises
self.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 _load(self, cls, methodName): (source)

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

Parameters
clsA TestCase subclass defining a test method.
methodNameThe name of the test method from cls.