summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-09-16 22:04:31 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-09-16 22:04:31 (GMT)
commitd21fd7bd863b0c3922c00dcf7c883bea2b1ab522 (patch)
treec96b335ae4e6a9903f75fc19025374b1df114b97
parent3404034a21c05f811a93d3c77c672dee719acd6c (diff)
downloadcpython-d21fd7bd863b0c3922c00dcf7c883bea2b1ab522.zip
cpython-d21fd7bd863b0c3922c00dcf7c883bea2b1ab522.tar.gz
cpython-d21fd7bd863b0c3922c00dcf7c883bea2b1ab522.tar.bz2
* Minor wording change
* Reference the doctest.DocTestSuite() conversion tool.
-rw-r--r--Doc/lib/libunittest.tex10
1 files changed, 8 insertions, 2 deletions
diff --git a/Doc/lib/libunittest.tex b/Doc/lib/libunittest.tex
index 5350edc..b5976c6 100644
--- a/Doc/lib/libunittest.tex
+++ b/Doc/lib/libunittest.tex
@@ -91,7 +91,7 @@ class.
\end{seealso}
-\subsection{Minimal example \label{minimal-example}}
+\subsection{Basic example \label{minimal-example}}
The \module{unittest} module provides a rich set of tools for
constructing and running tests. This section demonstrates that a
@@ -387,7 +387,7 @@ alltests = unittest.TestSuite((suite1, suite2))
\end{verbatim}
You can place the definitions of test cases and test suites in the
-same modules as the code they are to test (e.g.\ \file{widget.py}),
+same modules as the code they are to test (such as \file{widget.py}),
but there are several advantages to placing the test code in a
separate module, such as \file{widgettests.py}:
@@ -516,6 +516,12 @@ if __name__ == '__main__':
\end{verbatim}
\end{funcdesc}
+In some cases, the existing tests may have be written using the
+\module{doctest} module. If so, that module provides a
+\class{DocTestSuite} class that can automatically build
+\class{unittest.TestSuite} instances from the existing test code.
+\versionadded{2.3}
+
\subsection{TestCase Objects
\label{testcase-objects}}