Mercurial > python-for-js-programmers
changeset 15:01712d2193d3
Added section on documentation testing.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Thu, 05 Jun 2008 20:06:30 -0700 |
parents | 33f8f445378d |
children | a53f8b3f8666 |
files | PythonForJsProgrammers.txt |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 =====