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`.`itrial`.`ITestCase``

interface documentation

`class ITestCase(zi.Interface): (source)`

Known implementations: `twisted.trial.runner.TestHolder`, `twisted.trial.unittest.TestCase`, `twisted.trial.unittest.TestDecorator`

View In Hierarchy

The interface that a test case must implement in order to be used in Trial.

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 | `run` | Run the test, storing the results in `result`.
Method | `shortDescription` | Return a short description of the test.
Attribute | `failureException` | The exception class that is raised by failed assertions

def __call__(result): (source)

Run the test. Should always do exactly the same thing as run().

def countTestCases(): (source)

Return the number of tests in this test case. Usually 1.

def id(): (source)

Return a unique identifier for the test, usually the fully-qualified Python name.

def run(result): (source)

Run the test, storing the results in `result`.

Parameters
result | A `TestResult`.

def shortDescription(): (source)

Return a short description of the test.

failureException = (source)

The exception class that is raised by failed assertions