diff options
author | Tim Peters <tim.peters@gmail.com> | 2003-06-29 05:30:48 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2003-06-29 05:30:48 (GMT) |
commit | db3756dade0bba030946abcb8e50c914af84f31e (patch) | |
tree | 255f4495c95fd41e83e5ce0f82cae8342d0d637c /Misc | |
parent | e2f18377ff21c0e3217d561c8509e6816ecb362d (diff) | |
download | cpython-db3756dade0bba030946abcb8e50c914af84f31e.zip cpython-db3756dade0bba030946abcb8e50c914af84f31e.tar.gz cpython-db3756dade0bba030946abcb8e50c914af84f31e.tar.bz2 |
Some nifty doctest extensions from Jim Fulton, currently used in Zope3.
I won't have time to write real docs, but spent a lot of time adding
comments to his code and fleshing out the exported functions' docstrings.
There's probably opportunity to consolidate how docstrings get extracted
too, and the new code for that is probably better than the old code for
that (which strained mightily to recover from 2.2's new class/type
gimmicks).
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -86,6 +86,21 @@ Extension modules Library ------- +- Some happy doctest extensions from Jim Fulton have been added to + doctest.py. These are already being used in Zope3. The two + primary ones: + + doctest.debug(module, name) extracts the doctests from the named object + in the given module, puts them in a temp file, and starts pdb running + on that file. This is great when a doctest fails. + + doctest.DocTestSuite(module=None) returns a synthesized unittest + TestSuite instance, to be run by the unittest framework, which + runs all the doctests in the module. This allows writing tests in + doctest style (which can be clearer and shorter than writing tests + in unittest style), without losing unittest's powerful testing + framework features (which doctest lacks). + - ZipFile.testzip() now only traps BadZipfile exceptions. Previously, a bare except caught to much and reported all errors as a problem in the archive. |