[Python-checkins] python/dist/src/Doc/lib libdoctest.tex,1.43,1.44

edloper at users.sourceforge.net edloper at users.sourceforge.net
Tue Sep 21 05:00:54 CEST 2004


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13596/dist/src/Doc/lib

Modified Files:
	libdoctest.tex 
Log Message:
- Updated docs to reflect changes in 2.4.
  - Reorganized the documentation
  - Shifted focus a little more towards "literate testing"
  - Documented new functions and classes:
    - testfile()
    - Example, DocTest
    - DocTestParser, DocTestFinder, DocTestRunner, OutputChecker
    - DocFileSuite
    - DebugRunner, DocTestFailure, UnexpectedException
    - register_optionflag()


Index: libdoctest.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdoctest.tex,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- libdoctest.tex	19 Sep 2004 01:16:44 -0000	1.43
+++ libdoctest.tex	21 Sep 2004 03:00:51 -0000	1.44
@@ -1,22 +1,33 @@
 \section{\module{doctest} ---
-         Test docstrings represent reality}
+         Test interactive Python examples}
 
 \declaremodule{standard}{doctest}
 \moduleauthor{Tim Peters}{tim_one at users.sourceforge.net}
 \sectionauthor{Tim Peters}{tim_one at users.sourceforge.net}
 \sectionauthor{Moshe Zadka}{moshez at debian.org}
+\sectionauthor{Edward Loper}{edloper at users.sourceforge.net}
 
-\modulesynopsis{A framework for verifying examples in docstrings.}
[...1361 lines suppressed...]
+By interleaving prose and examples, it becomes much easier to keep
+track of what's actually being tested, and why.  When a test fails,
+the prose descriptions makes it much easier to figure out what the
+problem is, and how it should be fixed.  Regression testing is best
+confined to dedicated objects or files.  There are several options for
+organizing regressions:
+
+\begin{itemize}
+\item Define functions named \code{_regrtest_\textit{topic}} that
+      consist of single docstrings, containing test cases for the
+      named topics.  These functions can be included in the same file
+      as the module, or separated out into a separate test file.
+\item Define a \code{__test__} dictionary mapping from regression test
+      topics to docstrings containing test cases.
+\item Write a text file containing test cases as interactive examples,
+      and test that file using \function{testfunc()}.
+\end{itemize}
+
+
+



More information about the Python-checkins mailing list