class documentation

class twisted.trial.runner.ErrorHolder(TestHolder): (source)

View In Hierarchy

Used to insert arbitrary errors into a test suite run. Provides enough methods to look like a TestCase, however, when it is run, it simply adds an error to the TestResult. The most common use-case is for when a module fails to import.

Method __init__
Instance Variable error Undocumented
Method __repr__ Undocumented
Method run Run the test, reporting the error.

Inherited from TestHolder:

Class Variable failureException The exception class that is raised by failed assertions
Instance Variable description Undocumented
Method __call__ Run the test. Should always do exactly the same thing as run().
Method id Return a unique identifier for the test, usually the fully-qualified Python name.
Method countTestCases Return the number of tests in this test case. Usually 1.
Method shortDescription Return a short description of the test.
def __init__(self, description, error): (source)
ParametersdescriptionA string used by TestResults to identify this error. Generally, this is the name of a module that failed to import.
errorThe error to be added to the result. Can be an `exc_info` tuple or a twisted.python.failure.Failure.
error = (source)

Undocumented

def __repr__(self): (source)

Undocumented

ReturnsUndocumented (type: str)
def run(self, result): (source)

Run the test, reporting the error.

ParametersresultThe TestResult to store the results in. (type: twisted.trial.itrial.IReporter.)
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.