Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #64194
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: doctests compatibility for python 2 & python 3 |
| Date | 2014-01-17 16:10 -0500 |
| References | <52D91101.7000202@chamonix.reportlab.co.uk> <CAPTjJmqhr9V42ncZHKKGnE=N8KuUmV2t6M3eNYfZzkPNTYQF9A@mail.gmail.com> <CAPTjJmo6XqfZL5xYB-2pyhv+fsmB-faPrLK3y8-dcqRQFEyC9A@mail.gmail.com> <52D91EBB.2060606@chamonix.reportlab.co.uk> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5655.1389993070.18130.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: doctests compatibility for python 2 & python 3 Terry Reedy <tjreedy@udel.edu> - 2014-01-17 16:10 -0500
csiph-web