On Thu, Feb 3, 2011 at 15:10, Nick Coghlan <ncogh...@gmail.com> wrote: > On Fri, Feb 4, 2011 at 8:01 AM, brett.cannon <python-check...@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:
I will change it to make sure that it states that you may want to port your doctests if all you have is one massive set, but I do not think it is "*way* too strong". Massive doctest inputs are bad enough as it is to edit when you don't have a shift in syntax (e.g., I have a patch waiting for 3.3 which causes entire test suites to skip because they are a massive doctest and it is not reasonable nor easy to make something conditional based on whether a trace function is set). Trying to port them to new syntax is just that much harder (and a complaint I came across online while researching the HOWTO). -Brett > > 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 | ncogh...@gmail.com | Brisbane, Australia > _______________________________________________ > Python-checkins mailing list > python-check...@python.org > http://mail.python.org/mailman/listinfo/python-checkins > _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com