[TIP] ANNOUNCE: testdoc 0.1 - generate documents from unit tests
jml at mumak.net
Sat Apr 21 18:22:10 PDT 2007
testdoc is a simple utility to turn Python unit tests into
human-readable documentation. testdoc scans a testing module, finds
all of the tests, converts class and method names into phrases and
inserts the docstrings as paragraphs.
With the right sort of habits, this lets you quickly turn your
executable descriptions of behaviour into readable descriptions of
Writing your tests with testdoc output in mind can lead to the
emphasis on thoughtful communication that makes doctests so helpful.
At the same time, you get to write your tests in an environment that
is optimized for writing Python code, with all the benefits of
fixtures and easy refactoring that going along with it.
Example: This Python source file:
maps to this document:
testdoc is based on ideas found in AgileDox, a Java project.
More information about the testing-in-python