Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #64194 > unrolled thread

Re: doctests compatibility for python 2 & python 3

Started byTerry Reedy <tjreedy@udel.edu>
First post2014-01-17 16:10 -0500
Last post2014-01-17 16:10 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: doctests compatibility for python 2 & python 3 Terry Reedy <tjreedy@udel.edu> - 2014-01-17 16:10 -0500

#64194 — Re: doctests compatibility for python 2 & python 3

FromTerry Reedy <tjreedy@udel.edu>
Date2014-01-17 16:10 -0500
SubjectRe: doctests compatibility for python 2 & python 3
Message-ID<mailman.5655.1389993070.18130.python-list@python.org>
On 1/17/2014 7:14 AM, Robin Becker wrote:

> I tried this approach with a few more complicated outcomes and they fail
> in python2 or 3 depending on how I try to render the result in the doctest.

I never got how you are using doctests. There were certainly not meant 
for heavy-duty unit testing, but for testing combined with explanation. 
Section 26.2.3.7. (in 3.3) Warnings warns that they are fragile to even 
single char changes and suggests == as a workaround, as 'True' and 
'False' will not change. So I would not reject that option.

-- 
Terry Jan Reedy

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web