Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`trial`.`runner`.`ErrorHolder``

class documentation

`class 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__` | No summary
Method | `__repr__` | Undocumented
Method | `run` | Run the test, reporting the error.
Instance Variable | `error` | Undocumented

Inherited from `TestHolder`:

Method | `__call__` | Run the test. Should always do exactly the same thing as run().
Method | `countTestCases` | Return the number of tests in this test case. Usually 1.
Method | `id` | Return a unique identifier for the test, usually the fully-qualified Python name.
Method | `shortDescription` | Return a short description of the test.
Class Variable | `failureException` | The exception class that is raised by failed assertions
Instance Variable | `description` | Undocumented

def __init__(self, description, error): (source)
overrides `twisted.trial.runner.TestHolder.__init__`

Parameters
description | A string used by `TestResult`s to identify this error. Generally, this is the name of a module that failed to import.
error | The error to be added to the result. Can be an `exc_info` tuple or a `twisted.python.failure.Failure`.

def __repr__(self): (source)

Undocumented

Returns
`str` | Undocumented

def run(self, result): (source)
from `twisted.trial.itrial.ITestCase`
overrides `twisted.trial.runner.TestHolder.run`

Run the test, reporting the error.

Parameters
result:`twisted.trial.itrial.IReporter`. | The `TestResult` to store the results in.

error = (source)

Undocumented