Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'decorator': 0.09; 'dependency': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'api': 0.09; 'am,': 0.12; 'eckhardt': 0.16; 'email name:"': 0.16; 'failed.': 0.16; 'wrote:': 0.18; 'exists': 0.18; 'header:In-Reply-To:1': 0.22; 'tests': 0.25; '(like': 0.26; 'code.': 0.26; 'testing': 0.26; 'words,': 0.32; 'header:User-Agent:1': 0.33; 'header:X -Complaints-To:1': 0.33; 'there': 0.33; 'done': 0.34; 'to:addr :python-list': 0.34; 'setting': 0.34; 'occurs': 0.34; '(not': 0.35; 'test': 0.35; 'presence': 0.36; 'received:au': 0.36; 'subject:with': 0.36; 'another': 0.37; 'received:org': 0.38; 'e.g.': 0.39; "i'd": 0.39; 'should': 0.39; 'to:addr:python.org': 0.40; 'succeed': 0.73; '03:59': 0.84; 'received:110': 0.95 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Lie Ryan Subject: Re: replacing __dict__ with an OrderedDict Date: Tue, 10 Jan 2012 23:46:27 +1100 References: <11jrt8-l32.ln1@satorlaser.homedns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 110-175-240-90.static.tpgi.com.au User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0 In-Reply-To: <11jrt8-l32.ln1@satorlaser.homedns.org> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1326199608 news.xs4all.nl 6859 [2001:888:2000:d::a6]:39093 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18755 On 01/10/2012 03:59 AM, Ulrich Eckhardt wrote: > > > There is another dependency and that I'd call a logical dependency. This > occurs when e.g. test X tests for an API presence and test Y tests the > API behaviour. In other words, Y has no chance to succeed if X already > failed. Unfortunately, there is no way to express this relation, there > is no "@unittest.depends(test_X)" to decorate test_Y with (Not yet!). The skipIf decorator exists precisely for this purpose. Generally, testing availability of resources (like existence of an API) should be done outside of the testing code. In other words, test_X should never be a test in the first place, it should be part of the setting up of the tests; the tests themselves should be completely independent of each other.