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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '"if': 0.09; '__name__': 0.09; 'lines.': 0.09; 'subject:module': 0.09; 'runs': 0.10; 'cc:addr:python-list': 0.11; '"terry': 0.16; '>>': 0.16; '24,': 0.16; 'aiming': 0.16; 'clauses': 0.16; 'conditional': 0.16; 'email addr:udel.edu>': 0.16; 'email name:<tjreedy': 0.16; 'escapes': 0.16; 'idlelib': 0.16; 'reedy"': 0.16; 'ignore': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'thu,': 0.19; '>>>': 0.22; 'cc:addr:python.org': 0.22; '>>>': 0.24; 'package.': 0.24; 'script.': 0.24; 'environment': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '>': 0.26; 'header:In-Reply- To:1': 0.27; 'testing': 0.29; '2.3': 0.30; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; "skip:' 10": 0.31; '>>>>': 0.31; 'forces': 0.31; 'invoke': 0.31; 'though.': 0.31; 'file': 0.32; 'this.': 0.32; 'run': 0.32; 'test': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'coverage': 0.36; 'skip:& 10': 0.38; 'thank': 0.38; 'arrange': 0.38; 'pm,': 0.38; 'does': 0.39; 'reported': 0.39; 'ensure': 0.60; 'temporarily': 0.60; 'name': 0.63; '100%': 0.77; '3.4': 0.84; 'batchelder': 0.84; 'oscar': 0.84; 'request:': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=R1dkeEs5UTMq20IFhO2sIRYBs8Y544mlqzpoRth0MPs=; b=XWuApFjBPZkc+CNF0GqpdZVFmnlPjU3dV9ozln69m17YEMFw57zpvOE46Tlq+1aOtY Ig6aPgz9W+qbYuCvPR+XRcdNSQlJ9U/n55aSTCrfaE+Vk1xIgrkDbq2mCUOoohSCl3nO jO6AMDp5cSNnypABImlSkSWX2BsfRDWSvy3earb7PfmpOLn9Y1RbbBpRVVD6xI8i42yj Ktti5MnXaPJu6mjwghcVK6JKpMxPNM0GpNRxXUo223kyIE1cWIYBFLf8RjARv7JnLp6Z rMvJXExqH8HNxvSy5i4sjzvzUoQFsFFbonH92U33j9vB/XrG4PtEM3EZM49z8b3xWVb+ 1LcA== MIME-Version: 1.0 X-Received: by 10.221.44.136 with SMTP id ug8mr3779501vcb.13.1382687383940; Fri, 25 Oct 2013 00:49:43 -0700 (PDT) In-Reply-To: <526984F3.3040905@udel.edu> References: <5268a818$0$30000$c3e8da3$5496439d@news.astraweb.com> <7wtxg7cfww.fsf@benfinney.id.au> <526908b2$0$29981$c3e8da3$5496439d@news.astraweb.com> <52695CFB.9010309@nedbatchelder.com> <526984F3.3040905@udel.edu> Date: Fri, 25 Oct 2013 08:49:43 +0100 Subject: Re: Maintaining a backported module From: Oscar Benjamin To: Terry Reedy Content-Type: multipart/alternative; boundary=001a113378d85af73404e98bfe25 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: 69 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1382687393 news.xs4all.nl 15913 [2001:888:2000:d::a6]:49947 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:57502 --001a113378d85af73404e98bfe25 Content-Type: text/plain; charset=ISO-8859-1 On Oct 24, 2013 9:38 PM, "Terry Reedy" wrote: > > On 10/24/2013 1:46 PM, Ned Batchelder wrote: >>> >>> On Thu, 24 Oct 2013 06:36:04 -0400, Ned Batchelder wrote: >>>> >>>> coverage.py currently runs on 2.3 through 3.4 > > > I want to thank you for this package. I have used it when writing test modules for idlelib modules and aiming for 100% coverage forces me to really understand the code tested to hit all the conditional lines. > > >> It's been fun dropping the contortions for coverage.py 4.x, though! > > > One request: ignore "if __name__ == '__main__':" clauses at the end of files, which cannot be run under coverage.py, so 100% coverage is reported as 100% instead of 9x%. Coverage already does this. You have to put it in your coveragerc. Personally I arrange to ensure that I am testing that part though. You can enable coverage for these with the pth file and the environment variable whose name temporarily escapes me. Or you can just invoke coverage directly on the script. Oscar --001a113378d85af73404e98bfe25 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


On Oct 24, 2013 9:38 PM, "Terry Reedy" <tjreedy@udel.edu> wrote:
>
> On 10/24/2013 1:46 PM, Ned Batchelder wrote:
>>>
>>> On Thu, 24 Oct 2013 06:36:04 -0400, Ned Batchelder wrote:
>>>>
>>>> coverage.py currently runs on 2.3 through 3.4
>
>
> I want to thank you for this package. I have used it when writing test= modules for idlelib modules and aiming for 100% coverage forces me to real= ly understand the code tested to hit all the conditional lines.
>
>
>> It's been fun dropping the contortions for coverage.py 4.x, th= ough!
>
>
> One request: ignore "if __name__ =3D=3D '__main__':"= clauses at the end of files, which cannot be run under coverage.py, so 100= % coverage is reported as 100% instead of 9x%.

Coverage already does this. You have to put it in your coveragerc. Perso= nally I arrange to ensure that I am testing that part though. You can enabl= e coverage for these with the pth file and the environment variable whose n= ame temporarily escapes me. Or you can just invoke coverage directly on the= script.

Oscar

--001a113378d85af73404e98bfe25--