classification
Title: doctest should have lib2to3 integration
Type: enhancement Stage:
Components: 2to3 (2.x to 3.x conversion tool), Library (Lib) Versions: Python 3.2
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, bhy, collinwinter, eric.araujo, scoder, tim.peters
Priority: low Keywords:

Created on 2008-06-01 14:37 by scoder, last changed 2014-02-03 19:44 by BreamoreBoy.

Messages (3)
msg67594 - (view) Author: Stefan Behnel (scoder) * Date: 2008-06-01 14:37
Running a doctest with Py2 syntax in Py3 currently involves either
running the 2to3 tool by hand or writing code to convert the doctest
using lib2to3, and then running the modified version. This basically
pushes the burden of automating this step in any test runner script in
the world onto the authors or users of these scripts.

Writing portable code is hard enough, but writing portable doctests that
remain user readable should not remain as hard as it currently is. The
doctest module in Py3 should have a simple option to run a Py2 doctest
(in a file or doc string) without requiring users to write the glue code
for it.

On a related note, if a 3to2 tool becomes available, this should be
directly supported by doctest in Py2.6.
msg116566 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-09-16 16:06
Is this still valid, can it be closed as out of date or what?
msg116608 - (view) Author: √Čric Araujo (eric.araujo) * (Python committer) Date: 2010-09-16 20:31
Still valid IMO.
History
Date User Action Args
2014-02-03 19:44:21BreamoreBoysetnosy: - BreamoreBoy
2010-09-16 20:32:48eric.araujosetnosy: + tim.peters, benjamin.peterson

versions: + Python 3.2, - Python 3.0
2010-09-16 20:31:14eric.araujosetmessages: + msg116608
2010-09-16 16:06:01BreamoreBoysetnosy: + BreamoreBoy
messages: + msg116566
2010-01-31 16:20:21eric.araujosetnosy: + eric.araujo
2009-05-27 19:22:23bhysetnosy: + bhy
2008-11-26 15:49:08benjamin.petersonsetpriority: low
assignee: collinwinter ->
2008-06-01 14:37:26scodercreate