bugpokersource - Bugs: bug #13864, coverage.py 2.78 fails to detect...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #13864: coverage.py 2.78 fails to detect coverage sometimes; 3.0 fixes and is much faster.

Submitted by:  Bradley M. Kuhn <bkuhn>
Submitted on:  Sat 04 Jul 2009 08:34:26 PM UTC  
 
Category: build-system-poker-networkSeverity: 2 - Minor
Priority: 3 - LowStatus: Confirmed
Privacy: PublicAssigned to: None
Open/Closed: Open

Sat 04 Jul 2009 08:34:26 PM UTC, original submission:

Loic mentioned that there are some strange problems with coverage.py for some code. In particular, nullfilter.py is actually fully covered in poker-network, however, the report always says:

Name Stmts Exec Cover Missing
----------------------------------------------------------
../pokernetwork/nullfilter 2 0 0% 23-24

However, with the new python-coverage 3.0, which is partly written in C (BTW), it works fine, generating:

Name Stmts Exec Cover Missing
----------------------------------------------------------
../pokernetwork/nullfilter 2 2 100%

I think we should see if it's possible to migrate to python-coverage 3.0. It is not so easy to merely include as we do with 2.x versions, because it has C that must be compiled and now is split across multiple Python files. It can be found here, BTW:
http://nedbatchelder.com/code/coverage/

However, there may be a real advantage to speeding up the tests if we do. Check out these results from running test-pokeravatar.py in various versions w/ time(1):

Using our coverage.py, which is 2.78.20070930:
real 2m53.996s
user 1m43.666s
sys 0m7.776s

Using python-coverage 2.85-1 (from sid), there is hardly a measurable improvement:
real 2m37.812s
user 1m37.302s
sys 0m8.601s

However, check out using python-coverage 3.0 (unpackaged for Debian/Ubuntu, but I installed it by hand):
real 1m4.511s
user 0m24.818s
sys 0m7.756s

That's more than 50% speedup!!

Here are the upstream bugs I filed asking for packaging of python-coverage 3.0. If they are closed, I will afterward file backporting requests for Ubuntu.
https://bugs.launchpad.net/ubuntu/+source/python-coverage/+bug/395599
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535764

BTW, when this bug is closed, do not forget to add pokernetwork/nullfilter.py to run.in's 100% COVERAGE list.

Bradley M. Kuhn <bkuhn>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bkuhn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup