# HG changeset patch # User Atul Varma # Date 1212721590 25200 # Node ID 01712d2193d349e36dd91ab89577c78475d341d7 # Parent 33f8f445378dfcb663287b9fc9a1b51c21404cf4 Added section on documentation testing. diff -r 33f8f445378d -r 01712d2193d3 PythonForJsProgrammers.txt --- a/PythonForJsProgrammers.txt Thu Jun 05 20:02:39 2008 -0700 +++ b/PythonForJsProgrammers.txt Thu Jun 05 20:06:30 2008 -0700 @@ -513,6 +513,19 @@ .. _`PEP 8`: http://www.python.org/dev/peps/pep-0008 +Documentation Testing +===================== + +One of the most useful features of Python is one of its standard +library modules. The `doctest`_ module allows you to test +interactive interpreter excerpts embedded either in the docstrings of +your Python code or separate files to verify their correctness. It's +an excellent way to turn your documentation into your unit tests, and +it's also how the document you're reading right now is tested for +accuracy. + +.. _`doctest`: http://docs.python.org/lib/module-doctest.html + TODOs =====