# ``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 | `__init__` |
Method | `__repr__` | Undocumented
Method | `expected` |
Instance Variable | `errors` | Undocumented
Instance Variable | `reason` | Undocumented

def __init__(self, reason, errors=None): (source)

Parameters
reason | A string explaining why the test is marked 'todo'
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` is passed, then all errors will be trapped.

def __repr__(self): (source)

Undocumented

Returns
`str` | Undocumented

def expected(self, failure): (source)

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

errors = (source)

Undocumented

reason = (source)

Undocumented