1TRIAL(1)                                                              TRIAL(1)
2
3
4

NAME

6       trial - run unit tests
7

SYNOPSIS

9       trial [options] [[file|package|module|TestCase|testmethod]...]
10
11       trial --help
12

DESCRIPTION

14       trial  loads and executes a suite of unit tests, obtained from modules,
15       packages and files listed on the command line.
16
17       trial will take either filenames or fully  qualified  Python  names  as
18       arguments.  Thus 'trial myproject/foo.py', 'trial myproject.foo' and
19        'trial  myproject.foo.SomeTestCase.test_method'  are all valid ways to
20       invoke trial.
21
22       -b, --debug
23              Run the tests in the  Python  debugger.  Also  does  post-mortem
24              debugging on exceptions.
25
26       -B, --debug-stacktraces
27              Report Deferred creation and callback stack traces
28
29       --coverage
30              Generate coverage information in _trial_temp/coverage/. Requires
31              Python 2.3 or higher.
32
33       --disablegc
34              Disable the garbage collector.  I don't  know  why  this  is  in
35              trial.
36
37       -e, --rterrors
38              Print tracebacks to standard output as soon as they occur
39
40       --force-gc
41              Run  gc.collect()  before  and after each test case. This can be
42              used to isolate errors that occur when  objects  get  collected.
43              This  option  would  be  the  default, except it makes tests run
44              about ten times slower.
45
46       -h, --help
47              Print a usage message to standard output, then exit.
48
49       --help-reporters
50              Print a list of valid reporters to standard output, then exit.
51
52       --help-reactors
53              List the names of possibly available reactors.
54
55       -l, --logfile <logfile>
56              Direct the  log  to  a  different  file.  The  default  file  is
57              'test.log'.  <logfile> is relative to _trial_temp.
58
59       -n, --dry-run
60              Go through all the tests and make them pass without running.
61
62       -N, --no-recurse
63              By default, trial recurses through packages to find every module
64              inside every subpackage.  Unless,  that  is,  you  specify  this
65              option.
66
67       --nopm Don't  automatically jump into debugger for post-mortem analysis
68              of exceptions.  Only usable in conjunction with --debug.
69
70       --profile
71              I don't know what this option does.
72
73       -r, --reactor <reactor>
74              Choose which reactor to use.  See --help-reactors for a list.
75
76       --recursionlimit
77              Set Python's recursion limit.  I  don't  know  why  this  is  in
78              trial.
79
80       --reporter
81              Select  the reporter to use for Trial's output.  Use the --help-
82              reporters option to see a list of valid reporters.
83
84       --spew Print an insanely verbose log of everything that happens. Useful
85              when debugging freezes or locks in complex code.
86
87       --tbformat <format>
88              Format   to  display  tracebacks  with.  Acceptable  values  are
89              'default', 'brief' and 'verbose'.  'brief'  produces  tracebacks
90              that play nicely with Emacs' GUD.
91
92       --temp-directory <directory>
93              WARNING:  Do  not  use this options unless you know what you are
94              doing.  By default, trial creates a directory called _trial_temp
95              under  the current working directory.  When trial runs, it first
96              deletes this directory, then creates it, then changes  into  the
97              directory  to run the tests. The log file and any coverage files
98              are stored here. Use this option if you wish to have  trial  run
99              in  a  directory  other  than _trial_temp. Be warned, trial will
100              delete the directory before re-creating it.
101
102       --testmodule <filename>
103              Ask trial to look into <filename> and run  any  tests  specified
104              using the Emacs-style buffer variable 'test-case-name'.
105
106       -u, --until-failure
107              Keep  looping  the  tests until one of them raises an error or a
108              failure.  This is particularly useful for reproducing  intermit‐
109              tent failures.
110
111       -z, --random [<seed>]
112              Run the tests in random order using the specified seed.
113

AUTHOR

115       Written by Jonathan M. Lange
116

REPORTING BUGS

118       To report a bug, visit http://twistedmatrix.com/bugs/
119
121       Copyright © 2003-2006 Twisted Matrix Laboratories
122       This is free software; see the source for copying conditions.  There is
123       NO warranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR
124       PURPOSE.
125
126
127
128                                   July 2006                          TRIAL(1)
Impressum