trial [ options ] [ file | package | module | TestCase | testmethod ] ...
trial --help | -h
trial loads and executes a suite of unit tests, obtained from modules, packages and files listed on the command line.
trial will take either filenames or fully qualified Python names as arguments. Thus `trial myproject/foo.py', `trial myproject.foo' and `trial myproject.foo.SomeTestCase.test_method' are all valid ways to invoke trial. Multiple such arguments are also accepted, and their order will determine the order in which the corresponding tests are run.
After running the given test suite, the default test reporter prints a summary of the test run. This consists of the word "PASSED" (if all tests ran as expected) or "FAILED" (if any test behaved unexpectedly) followed by a count of the different kinds of test results encountered. The possible kinds of test results includes:
Each `.cover' file contains a copy of the Python source of the module in question, with a prefix at the beginning of each line containing coverage information. For lines that are not executable (blank lines, comments, etc.) the prefix is blank. For executable lines that were run in the course of the test suite, the prefix is a number indicating the number of times that line was executed. The string `>>>>>>' prefixes executable lines that were not executed in the course of the test suite.
Note that this functionality uses Python's sys.settrace() function, so tests that call sys.settrace() themselves are likely to break trial's coverage functionality.
The latest version of the trial documentation can be found at http://twistedmatrix.com/documents/current/core/howto/testing.html
Written by Jonathan M. Lange
To report a bug, visit http://twistedmatrix.com/trac/newticket
Copyright © 2003-2013 Twisted Matrix Laboratories This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.