holger krekel | 5 Nov 2009 18:19
Picon
Favicon

py.test-1.1.0: Python3, Jython, better skipping, cleanups

Dear Testing-In-Python list,

i just uploaded the final py-1.1.0 package to PyPI. 

It brings Python3 and Jython compatibility (implemented
in a single-source fashion) and introduces new systematic methods 
for marking functions e.g. for conditional skipping, fixes
bugs, has better reporting etc., see here:

    http://pylib.org/announce/release-1.1.0.html

Despite huge internal changes and cleanups this release is meant to 
be compatible to 1.0.2 - even most 3rd party plugins should continue 
to work, a plugin list with all plugins i know about is here: 

    http://pytest.org/plugin/index.html

cheers & have fun,

holger

--

-- 
Metaprogramming, Python, Testing: http://tetamap.wordpress.com
Python, PyPy, pytest contracting: http://merlinux.eu 
Ned Batchelder | 11 Nov 2009 04:32
Favicon
Gravatar

Coverage.py 3.2b1: Branch coverage

I'm pleased to announce coverage.py v3.2b1, now with branch coverage!

Details are on my blog announcement: 
http://nedbatchelder.com/blog/200911/coverage_v32b1_branch_coverage.html

I should mention that the idea for the fundamental technique here came 
from Titus at Pycon.  He called it time series analysis, but I'm not 
that smart, so I just think of it as tracking what follows what.  
Basically, instead of tracking a set of line numbers for each file, we 
track a set of pairs of line numbers, so every transition from line to 
line is tracked.  Then static analysis of the byte code shows which 
transitions are possible. The difference is the missing branches.

Give it a spin, and let me know what you think.

--Ned.
http://nedbatchelder.com
Victoria G. Laidler | 11 Nov 2009 16:33

Re: Coverage.py 3.2b1: Branch coverage]

Ned Batchelder wrote:

> I'm pleased to announce coverage.py v3.2b1, now with branch coverage!
This looks great, Ned - thanks!

I notice from the announcement that:

> The only way currently to initiate branch coverage is with the 
> command-line interface. In particular, the nose coverage plugin has no 
> way to use it.

Do you plan to update the plugin at some point so that it can use the 
branch coverage?

thanks,
Vicki

>
> Details are on my blog announcement: 
> http://nedbatchelder.com/blog/200911/coverage_v32b1_branch_coverage.html
>
> I should mention that the idea for the fundamental technique here came 
> from Titus at Pycon. He called it time series analysis, but I'm not 
> that smart, so I just think of it as tracking what follows what. 
> Basically, instead of tracking a set of line numbers for each file, we 
> track a set of pairs of line numbers, so every transition from line to 
> line is tracked. Then static analysis of the byte code shows which 
> transitions are possible. The difference is the missing branches.
>
> Give it a spin, and let me know what you think.
(Continue reading)

Ned Batchelder | 11 Nov 2009 16:49
Favicon
Gravatar

Re: Coverage.py 3.2b1: Branch coverage]

Victoria G. Laidler wrote:
> I notice from the announcement that:
>
>> The only way currently to initiate branch coverage is with the 
>> command-line interface. In particular, the nose coverage plugin has 
>> no way to use it.
>
> Do you plan to update the plugin at some point so that it can use the 
> branch coverage?
>
Yes, that's one of the more important items on the todo-list, to figure 
out what to do with the nose plugin so that it can keep up with the 
development of coverage.py.  The best plan is for coverage.py to ship 
the plugin rather than nose, so it can be kept in sync, but that hasn't 
happened yet.

Remember that you can use coverage to run nose instead of the other way 
around:

   coverage run c:\Python25\Scripts\nosetests-2.5-script.py 
nose-arguments etc blah etc

This will measure the nose code also, but for interestingly-sized 
projects, this will be negligible overhead.
> thanks,
> Vicki
>
--Ned.
holger krekel | 11 Nov 2009 17:20
Picon
Favicon

Re: Coverage.py 3.2b1: Branch coverage]

Hi Ned, Vicky, all,

what about a plugin that works on both nose and pytest? 

Rozza has done a coverage plugin for pytest here. 
http://github.com/rozza/py.test-plugins/blob/master/pytest_coverage.py
and i am happy to help to work on a joint one.  
If i see it correctly it shouldn't be hard to make a 
single source & setup for a nose/py.test plugin. 

cheers,
holger

On Wed, Nov 11, 2009 at 10:49 -0500, Ned Batchelder wrote:
> Victoria G. Laidler wrote:
>> I notice from the announcement that:
>>
>>> The only way currently to initiate branch coverage is with the  
>>> command-line interface. In particular, the nose coverage plugin has  
>>> no way to use it.
>>
>> Do you plan to update the plugin at some point so that it can use the  
>> branch coverage?
>>
> Yes, that's one of the more important items on the todo-list, to figure  
> out what to do with the nose plugin so that it can keep up with the  
> development of coverage.py.  The best plan is for coverage.py to ship  
> the plugin rather than nose, so it can be kept in sync, but that hasn't  
> happened yet.
>
(Continue reading)

Matt Harrison | 11 Nov 2009 17:35
Picon
Gravatar

Re: Coverage.py 3.2b1: Branch coverage

On Tue, Nov 10, 2009 at 8:32 PM, Ned Batchelder <ned <at> nedbatchelder.com> wrote:
> I'm pleased to announce coverage.py v3.2b1, now with branch coverage!
>

This is wonderful.  My brain has been churning since I read this.

I'm interested in working on:

* using branch coverage to get path coverage
* visualization of flow graphs (probably svg) - similar to McCabe's [0]
* annotation of source code to illustrate flow graphs - similar to "OH
HAI I FOUND UR BUG" [1]
* generic tools for editor integration
  * emacs support on top of this

Anyone else interested in collaborating?  If I don't get time between
now and PyCon is anyone interested in sprinting on these?

Thanks again Ned!

cheers,

-matt

0 - http://www.mccabe.com/iq_research_nist.htm
1 - http://arstechnica.com/apple/reviews/2009/08/mac-os-x-10-6.ars/9
Ned Batchelder | 11 Nov 2009 17:53
Favicon
Gravatar

Re: Coverage.py 3.2b1: Branch coverage]

holger krekel wrote:
> Hi Ned, Vicky, all,
>
> what about a plugin that works on both nose and pytest? 
>
> Rozza has done a coverage plugin for pytest here. 
> http://github.com/rozza/py.test-plugins/blob/master/pytest_coverage.py
> and i am happy to help to work on a joint one.  
> If i see it correctly it shouldn't be hard to make a 
> single source & setup for a nose/py.test plugin. 
>
>   
This seems like a great idea...

--Ned.
jason pellerin | 11 Nov 2009 18:44
Picon
Gravatar

Re: Coverage.py 3.2b1: Branch coverage]

On Wed, Nov 11, 2009 at 11:53 AM, Ned Batchelder <ned <at> nedbatchelder.com> wrote:
> holger krekel wrote:
>>
>> Hi Ned, Vicky, all,
>>
>> what about a plugin that works on both nose and pytest?
>> Rozza has done a coverage plugin for pytest here.
>> http://github.com/rozza/py.test-plugins/blob/master/pytest_coverage.py
>> and i am happy to help to work on a joint one.  If i see it correctly it
>> shouldn't be hard to make a single source & setup for a nose/py.test plugin.
>>
>
> This seems like a great idea...

Yes!

JP
Victoria G. Laidler | 11 Nov 2009 18:51

nose/py.test plugins (was Re: Coverage.py 3.2b1: Branch coverage])

Hi Holger and Jason,

Is there a write-up anywhere yet that has instructions for plugin 
authors who want to make their plugins compatible with both test systems?

Or maybe two simple-minded writeups, one to convert an existing nose 
plugin to support py.test, and the other for vice-versa?

Vicki

jason pellerin wrote:
> On Wed, Nov 11, 2009 at 11:53 AM, Ned Batchelder <ned <at> nedbatchelder.com> wrote:
>   
>> holger krekel wrote:
>>     
>>> Hi Ned, Vicky, all,
>>>
>>> what about a plugin that works on both nose and pytest?
>>> Rozza has done a coverage plugin for pytest here.
>>> http://github.com/rozza/py.test-plugins/blob/master/pytest_coverage.py
>>> and i am happy to help to work on a joint one.  If i see it correctly it
>>> shouldn't be hard to make a single source & setup for a nose/py.test plugin.
>>>
>>>       
>> This seems like a great idea...
>>     
>
> Yes!
>
> JP
(Continue reading)

holger krekel | 11 Nov 2009 19:29
Picon
Favicon

Re: nose/py.test plugins (was Re: Coverage.py 3.2b1: Branch coverage])

Hi Vicky, Ned, Jason, 

On Wed, Nov 11, 2009 at 12:51 -0500, Victoria G. Laidler wrote:
> Hi Holger and Jason,
>
> Is there a write-up anywhere yet that has instructions for plugin  
> authors who want to make their plugins compatible with both test systems?
> Or maybe two simple-minded writeups, one to convert an existing nose  
> plugin to support py.test, and the other for vice-versa?

no write-ups i know off.  

My impression is that people like to work from real-life examples.  
Let's open a coverage-fork on bitbucket and give all
interested people write-access there ... (Ned, if you do it,
my username is 'hpk42' there). 

best,
holger

> Vicki
>
> jason pellerin wrote:
>> On Wed, Nov 11, 2009 at 11:53 AM, Ned Batchelder <ned <at> nedbatchelder.com> wrote:
>>   
>>> holger krekel wrote:
>>>     
>>>> Hi Ned, Vicky, all,
>>>>
>>>> what about a plugin that works on both nose and pytest?
(Continue reading)


Gmane