[Python-checkins] r88331 - in python/branches/py3k/Doc/howto: index.rst pyporting.rst

Nick Coghlan ncoghlan at gmail.com
Fri Feb 4 00:10:07 CET 2011


On Fri, Feb 4, 2011 at 8:01 AM, brett.cannon <python-checkins at python.org> wrote:
> +Stop Using :mod:`doctest`
> +'''''''''''''''''''''''''
> +While 2to3 tries to port doctests properly, it's a rather tough thing to do. It
> +is probably best to simply convert your critical doctests to :mod:`unittest`.

This advice strikes me as being *way* too strong. Perhaps something like:

Consider limiting use of :mod:`doctest`
===============================

While 2to3 tries to port doctests properly, it's a rather tough thing
to do. If your test suite is heavily doctest dependent, then you may
end up spending a lot of time manually fixing doctests. The two major
avenues for dealing with this are to either port doctest based tests
over to the unittest module (making them significantly easier for 2to3
to handle) or else to follow the guidelines below for writing 2/3
compatible source code in all doctests (making it so they should run
unmodified on both Python versions).


Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-checkins mailing list