[From nobody Mon Dec 17 15:45:32 2007 Return-path: <Jim.Vickroy@noaa.gov> Received: from [140.172.223.207] (223-207.swpc.noaa.gov [140.172.223.207]) by email.boulder.noaa.gov (iPlanet Messaging Server 5.2 HotFix 2.01 (built Aug 26 2004)) with ESMTPSA id <0JT200J1N9GA5B@email.boulder.noaa.gov> for jim.vickroy@noaa.gov; Fri, 14 Dec 2007 22:36:23 +0000 (GMT) Date: Fri, 14 Dec 2007 22:36:10 +0000 From: Jim Vickroy <Jim.Vickroy@noaa.gov> Subject: [Fwd: Re: py.test generative tests behavior unexpected] To: Jim.Vickroy@noaa.gov, jgv-home@comcast.net Message-id: <4763055A.7010304@noaa.gov> MIME-version: 1.0 Content-type: multipart/mixed; boundary="Boundary_(ID_QHB+48FjtRWwuemdv7DzvA)" User-Agent: Thunderbird 1.5.0.12 (X11/20071018) Original-recipient: rfc822;jim.vickroy@noaa.gov This is a multi-part message in MIME format. --Boundary_(ID_QHB+48FjtRWwuemdv7DzvA) Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT --Boundary_(ID_QHB+48FjtRWwuemdv7DzvA) Content-type: message/rfc822; name="Re: py.test generative tests behavior unexpected" Content-disposition: inline; filename="Re: py.test generative tests behavior unexpected" Return-path: <cfbolz@gmx.de> Path: nems.noaa.gov!feed.news.qwest.net!mpls-nntp-02.inet.qwest.net!216.196.98.141.MISMATCH!border2.nntp.dca.giganews.com!novia!feeder.news-service.com!feeder.news-service.com!border1.nntp.ams.giganews.com!nntp.giganews.com!transit.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail X-Trace: 1197671440 news.xs4all.nl 85790 [::ffff:194.109.207.14]:46289 Date: Fri, 14 Dec 2007 23:30:37 +0100 From: Carl Friedrich Bolz <cfbolz@gmx.de> Subject: Re: py.test generative tests behavior unexpected In-reply-to: <fjut7c$q7p$1@news.nems.noaa.gov> To: Jim Vickroy <Jim.Vickroy@noaa.gov> Cc: python-list@python.org Message-id: <mailman.2405.1197671440.13605.python-list@python.org> X-Complaints-to: abuse@xs4all.nl MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT Precedence: list X-BeenThere: python-list@python.org Delivered-to: python-list@bag.python.org User-Agent: Thunderbird 2.0.0.6 (X11/20071022) X-Original-To: python-list@python.org X-Spam-Status: OK 0.004 X-Authenticated: #868061 X-Provags-ID: V01U2FsdGVkX19ddGM+phddUGj6ri5cWRwZWzOreMACtRgW+FSqxj JMEhbb76ftd4Is X-Y-GMX-Trusted: 0 X-Original-Bytes: 2824 Newsgroups: gmane.comp.python.general, comp.lang.python NNTP-posting-host: 194.109.207.14 References: <fjut7c$q7p$1@news.nems.noaa.gov> X-Mailman-Version: 2.1.9 List-Post: <mailto:python-list@python.org> List-Subscribe: <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> List-Unsubscribe: <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> List-Archive: <http://mail.python.org/pipermail/python-list> List-Help: <mailto:python-list-request@python.org?subject=help> List-Id: General discussion list for the Python programming language <python-list.python.org> Xref: nems.noaa.gov comp.lang.python:518864 Jim Vickroy wrote: > Hello all, > > I'm a first time user of py.tests. > > My setup is: > * py.test v0.9.0 > * Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit > (Intel)] on win32 > * Microsoft Windows XP Pro (service pack 2) > > The attached file (py-test-generator-trial.py) demonstrates a behavior I > do not understand. > > When test_filters() is implemented as a generator, the tests appear to > be run twice and all tests fail during the second iteration except for > the final case ('AL12_1','Gray') in the loop. > > When the yield statement, in test_filters(), is disabled and the > assertion statement is enabled, the behavior is as expected -- namely > the tests are performed once and all pass. > > Could someone help me to understand this behavior? I think you will have more luck at the py-lib developer mailing list here: py-dev@codespeak.net The mailman list info is here: http://codespeak.net/mailman/listinfo/py-dev Cheers, Carl Friedrich --Boundary_(ID_QHB+48FjtRWwuemdv7DzvA)-- ]