This article was originally published by Python Magazine in
March of 2008.
Automated Testing with unittest and Proctor
Listing1.txt
proctorbatch
Proctor is a tool for running unit tests. It enhances the
existing unittest module to provide the ability to find all tests
in a set of code, categorize them, and run some or all of them.
Test output may be generated in a variety of formats to support
parsing by another tool or simple, nicely formatted, reports for
human review.
SYNTAX:
proctorbatch [<options>] [<directory name> ...]
--category=categoryName
--coverage-exclude=pattern
--coverage-file=filename
--debug
--interleaved
--list
--list-categories
--no-coverage
--no-gc
--no-run
--parsable
-q
-v
OPTIONS:
-h Displays abbreviated help message.
--help Displays complete usage information.
--category=categoryName
Run only the tests in the specified category.
Warning: If there are no tests in a category,
an error will not be produced. The test suite
will appear to be empty.
--coverage-exclude=pattern
Add a line exclude pattern
(can be a regular expression).
--coverage-file=filename
Write coverage statistics to the specified file.
--debug Turn on debug mode to see tracebacks.
--interleaved Interleave error and failure messages
with the test list.
--list List tests.
--list-categories
List test categories.
--no-coverage Disable coverage analysis.
--no-gc Disable garbage collection and leak reporting.
--no-run Do not run the tests
--parsable Format output to make it easier to parse.
-q Turn on quiet mode.
-v Increment the verbose level.
Higher levels are more verbose.
The default is 1.