[Biopython-dev] 2to3 and doctests

Peter biopython at maubp.freeserve.co.uk
Wed Jul 14 11:52:48 UTC 2010


2010/7/14 Tiago Antão <tiagoantao at gmail.com>:
>
> 2010/7/14 Peter <biopython at maubp.freeserve.co.uk>:
>> We're not the only people to run into problems with 2to3 and doctest
>> not working properly:
>>
>> http://lucumr.pocoo.org/2010/2/11/porting-to-python-3-a-guide
>>
>> Most of our doctests still work after 2to3 and I guess we can look at
>> the failures on a case by case basis (and for expediency move them
>> into proper unit tests or remove them if they can't be tweaked to
>> work on both Python 2.x and 3.x).
>
> I don't have the cases here, but they are only a handful. I suppose
> they can either be converted to (ugly) single-liners or to unit-tests.
>
> Anyway, it is a pity that 2to3 doctests are in such a state. Because
> all the rest seems to work quite well.
>
> Tiago
> PS - I can do this today, just tell me if you prefer single-liners or unit-tests

So is it basically just multi-line doctests with slash continuation chars
we have a problem with? Those were always a bit ugly - but seemed
the best solution given the desire to limit ourselves to 80 character
lines.

Could you make them single liners for now (least work to get the tests
to pass), and I'll take a look at the commit later. If these are from my
examples I'll then have a think about how better to handle them.

Peter




More information about the Biopython-dev mailing list