diff options
author | Brett Cannon <bcannon@gmail.com> | 2007-03-25 01:32:36 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2007-03-25 01:32:36 (GMT) |
commit | 27ef61ca1851e5c7ad5a5207f54ef318d17668eb (patch) | |
tree | 91c848dd9ccfbb4f3a646840843b07f22e453c6f /Doc/lib | |
parent | 3d52e5f07db0958c1642d4f804d16d6e15376a33 (diff) | |
download | cpython-27ef61ca1851e5c7ad5a5207f54ef318d17668eb.zip cpython-27ef61ca1851e5c7ad5a5207f54ef318d17668eb.tar.gz cpython-27ef61ca1851e5c7ad5a5207f54ef318d17668eb.tar.bz2 |
Change the docs to no longer claim that unittest is preferred over doctest for
regression tests.
Diffstat (limited to 'Doc/lib')
-rw-r--r-- | Doc/lib/libtest.tex | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Doc/lib/libtest.tex b/Doc/lib/libtest.tex index 326c5f0..d22f50d 100644 --- a/Doc/lib/libtest.tex +++ b/Doc/lib/libtest.tex @@ -14,11 +14,11 @@ your tests while \module{test.regrtest} drives the testing suite. Each module in the \module{test} package whose name starts with \samp{test_} is a testing suite for a specific module or feature. -All new tests should be written using the \refmodule{unittest} module; -using \refmodule{unittest} is not required but makes the tests more -flexible and maintenance of the tests easier. Some older tests are -written to use \refmodule{doctest} and a ``traditional'' testing -style; these styles of tests will not be covered. +All new tests should be written using the \refmodule{unittest} or +\refmodule{doctest} module. Some older tests are +written using a ``traditional'' testing style that compares output +printed to \code{sys.stdout}; this style of test is considered +deprecated. \begin{seealso} \seemodule{unittest}{Writing PyUnit regression tests.} @@ -29,8 +29,8 @@ style; these styles of tests will not be covered. \subsection{Writing Unit Tests for the \module{test} package% \label{writing-tests}} -It is preferred that tests for the \module{test} package use the -\refmodule{unittest} module and follow a few guidelines. +It is preferred that tests that use the \refmodule{unittest} module +follow a few guidelines. One is to name the test module by starting it with \samp{test_} and end it with the name of the module being tested. The test methods in the test module should start with \samp{test_} and end with |