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`.`util`.`_Janitor``

class documentation

`class _Janitor: (source)`

View In Hierarchy

The guy that cleans up after you.

Method | `__init__` | No summary
Method | `postCaseCleanup` | Called by `unittest.TestCase` after a test to catch any logged errors or pending `DelayedCall`s.
Method | `postClassCleanup` | Called by `unittest.TestCase` after the last test in a `TestCase` subclass. Ensures the reactor is clean by murdering the threadpool, catching any pending `DelayedCall`s, open sockets etc.
Instance Variable | `reactor` | The reactor to use. If None, the global reactor will be used.
Instance Variable | `result` | The `IReporter` to report errors to.
Instance Variable | `test` | The `TestCase` to report errors about.
Method | `_cleanPending` | Cancel all pending calls and return their string representations.
Method | `_cleanReactor` | Remove all selectables from the reactor, kill any of them that were processes, and return their string representation.
Method | `_cleanThreads` | Undocumented
Method | `_getReactor` | Get either the passed-in reactor or the global reactor.

def __init__(self, test, result, reactor=None): (source)

Parameters
test | See `_Janitor.test`.
result | See `_Janitor.result`.
reactor | See `_Janitor.reactor`.

def postCaseCleanup(self): (source)

Called by `unittest.TestCase` after a test to catch any logged errors or pending `DelayedCall`s.

def postClassCleanup(self): (source)

Called by `unittest.TestCase` after the last test in a `TestCase` subclass. Ensures the reactor is clean by murdering the threadpool, catching any pending `DelayedCall`s, open sockets etc.

reactor = (source)

The reactor to use. If None, the global reactor will be used.

result = (source)

The `IReporter` to report errors to.

test = (source)

The `TestCase` to report errors about.

def _cleanPending(self): (source)

Cancel all pending calls and return their string representations.

def _cleanReactor(self): (source)

Remove all selectables from the reactor, kill any of them that were processes, and return their string representation.

def _cleanThreads(self): (source)

Undocumented

def _getReactor(self): (source)

Get either the passed-in reactor or the global reactor.