t.trial : package documentation

Part of twisted View Source

Asynchronous unit testing framework.

Trial extends Python's builtin unittest to provide support for asynchronous tests.

Maintainer: Jonathan Lange

Trial strives to be compatible with other Python xUnit testing frameworks. "Compatibility" is a difficult things to define. In practice, it means that:

This list is not necessarily exhaustive -- compatibility is hard to define. Contributors who discover more helpful ways of defining compatibility are encouraged to update this document.

Examples:

Timeouts for tests should be implemented in the runner. If this is done, then timeouts could work for third-party TestCase objects as well as for twisted.trial.unittest.TestCase objects. Further, Twisted TestCase objects will run in other runners without timing out. See http://twistedmatrix.com/trac/ticket/2675.

Running tests in a temporary directory should be a feature of the test case, because often tests themselves rely on this behaviour. If the feature is implemented in the runner, then tests will change behaviour (possibly breaking) when run in a different test runner. Further, many tests don't even care about the filesystem. See http://twistedmatrix.com/trac/ticket/2916.

Module itrial Interfaces for Trial.
Module reporter Defines classes that handle the results of tests.
Module runner A miscellany of code used to run Trial tests.
Module unittest Things likely to be used by writers of unit tests.
Module util A collection of utility functions and classes, used internally by Trial.
API Documentation for Twisted, generated by pydoctor at 2012-09-01 11:44:56.