Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.alphanet.ch!alphanet.ch!news.imp.ch!weretis.net!feeder4.news.weretis.net!nuzba.szn.dk!pnx.dk!amsnews11.chello.com!newsfeed.xs4all.nl!newsfeed5.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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'skip': 0.04; 'fashion.': 0.07; 'decorator': 0.09; 'dependency': 0.09; 'api': 0.09; 'am,': 0.12; 'eckhardt': 0.16; 'email name:"': 0.16; 'failed.': 0.16; 'failures,': 0.16; 'unittest,': 0.16; 'cc:addr:python-list': 0.16; 'mon,': 0.16; 'wrote:': 0.18; 'jan': 0.19; 'cc:no real name:2**0': 0.20; 'maybe': 0.21; 'header:In-Reply-To:1': 0.22; 'implicit': 0.23; 'cc:2**0': 0.24; 'tests': 0.25; 'tree': 0.25; 'depends': 0.28; 'message-id:@mail.gmail.com': 0.28; 'explicitly': 0.29; 'cc:addr:python.org': 0.29; 'least': 0.30; 'words,': 0.32; 'there': 0.33; 'occurs': 0.34; 'root': 0.34; '(not': 0.35; 'received:74.125.82': 0.35; 'test': 0.35; 'presence': 0.36; 'subject:with': 0.36; 'received:74.125': 0.37; 'received:google.com': 0.37; 'another': 0.37; 'could': 0.37; 'e.g.': 0.39; "i'd": 0.39; 'either': 0.39; 'mark': 0.39; 'taking': 0.66; '2012': 0.67; 'succeed': 0.73; 'hand,': 0.76; 'distinguish': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=cTHbivcSv5i1bXugcwHETLcPDqNqMxwtlYUbBtxfgSY=; b=trjnJhYZ1sk5AeAmgs4QxDDGrDk6ThrAxO+/9WbmeIO6XYZjtpjDun/yvx5g0Epjix 6F9rTJEaXY5QwZUGIuWtGkQ/ZRCCMeVZRvT6KyCPRyJv6FdeaVtkjHdmQ4V/wjtI6VGK gsY2ZrH2z7x/sx/kFhi+TuBhhEqWyAbjN6m5g= MIME-Version: 1.0 In-Reply-To: <11jrt8-l32.ln1@satorlaser.homedns.org> References: <11jrt8-l32.ln1@satorlaser.homedns.org> From: Ian Kelly Date: Mon, 9 Jan 2012 10:30:19 -0700 Subject: Re: replacing __dict__ with an OrderedDict To: Ulrich Eckhardt Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1326130252 news.xs4all.nl 6865 [2001:888:2000:d::a6]:39756 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18711 On Mon, Jan 9, 2012 at 9: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!). Each test > would be the root of a tree of tests that it depends on. If a dependency > fails already, you can either skip the tree or at least mark the following > test failures as implicit failures, so that you can easily distinguish them > from the root cause. I can see where that could be useful. On the other hand, if such a decorator were included in unittest, I can already envision people abusing it to explicitly enshrine their operational dependencies, maybe even taking it as encouragement to write their tests in that fashion.