Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'tool,': 0.07; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; '~ethan~': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'intended.': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'tests': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'certainly': 0.24; "haven't": 0.24; 'cc:2**0': 0.24; 'pass': 0.26; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'assert': 0.31; 'probably': 0.32; 'run': 0.32; 'but': 0.35; 'easily': 0.37; 'pm,': 0.38; 'read': 0.60; 'received:173': 0.61; 'specialized': 0.65; 'optimized': 0.68; 'to:addr:yahoo.com': 0.81; 'ethan': 0.84; 'furman': 0.84 Date: Tue, 11 Nov 2014 13:15:54 -0800 From: Ethan Furman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Albert-Jan Roskam Subject: Re: I love assert References: <54626CB0.5080405@stoneleaf.us> <1900956607.76400.1415740156398.JavaMail.yahoo@jws10772.mail.gq1.yahoo.com> In-Reply-To: <1900956607.76400.1415740156398.JavaMail.yahoo@jws10772.mail.gq1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "python-list@python.org" 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1415740565 news.xs4all.nl 2854 [2001:888:2000:d::a6]:44756 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:80565 On 11/11/2014 01:09 PM, Albert-Jan Roskam wrote: > Ethan Furman wrote: >> >> asserts are a specialized tool, easily abused. Sounds like you are using them >> exactly as intended. > > Would you say that assert is baaadly abused in nose?*) I never tried it, but > probably all tests pass when Python is run with -O or -OO. I don't know, haven't used it nor read the code. It would certainly not be good if it failed in optimized mode. -- ~Ethan~