Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'warnings': 0.04; 'reject': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:skip:c 10': 0.09; 'testing,': 0.09; 'jan': 0.12; 'changes': 0.15; 'outcomes': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'meant': 0.20; '(in': 0.22; 'header:User- Agent:1': 0.23; 'certainly': 0.24; 'char': 0.24; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'testing': 0.29; 'am,': 0.29; 'option.': 0.31; 'but': 0.35; 'there': 0.35; 'unit': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'even': 0.60; 'received:173': 0.61; 'more': 0.64; 'subject: & ': 0.68; "'true'": 0.84; 'received:fios.verizon.net': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: doctests compatibility for python 2 & python 3 Date: Fri, 17 Jan 2014 16:10:50 -0500 References: <52D91101.7000202@chamonix.reportlab.co.uk> <52D91EBB.2060606@chamonix.reportlab.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-254-207.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <52D91EBB.2060606@chamonix.reportlab.co.uk> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389993070 news.xs4all.nl 2972 [2001:888:2000:d::a6]:51736 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:64194 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