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`.`unittest`.`Todo``

class documentation

`class Todo: (source)`

View In Hierarchy

Internal object used to mark a `TestCase` as 'todo'. Tests marked 'todo' are reported differently in Trial `TestResult`s. If todo'd tests fail, they do not fail the suite and the errors are reported in a separate category. If todo'd tests succeed, Trial `TestResult`s will report an unexpected success.

Method | `__repr__` | Undocumented
Method | `expected` | No summary
Instance Variable | `errors` | An iterable of exception types that the test is expected to raise. If one of these errors is raised by the test, it will be trapped. Raising any other kind of error will fail the test. If `None` then all errors will be trapped.
Instance Variable | `reason` | A string explaining why the test is marked 'todo'

def __repr__(self) -> `str`: (source)

Undocumented

def expected(self, failure): (source)

Parameters
failure | A `twisted.python.failure.Failure`.
Returns
`True` if `failure` is expected, `False` otherwise.

errors: `Optional[Iterable[Type[BaseException]]]` = (source)

An iterable of exception types that the test is expected to raise. If one of these errors is raised by the test, it will be trapped. Raising any other kind of error will fail the test. If `None` then all errors will be trapped.

reason: `str` = (source)

A string explaining why the test is marked 'todo'