⇤ ← Revision 1 as of 2005-04-02 13:41:39
Size: 457
Comment:
|
Size: 479
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 4: | Line 4: |
See also UnitTests |
doctest.py is a lightweight "literate programming"-style testing framework for python. Released by Tim Peters in 1999 now part of the python standard library.
You define a test by executing some code in an interactive session, and then pasting it along with the output into a nearby docstring. When you run your module at the command-line, doctest executes each one of these code examples, compares the expected and actual output and provides a report.
See also UnitTests