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.
|