[TIP] nose/py.test plugins

Ned Batchelder ned at nedbatchelder.com
Tue Nov 24 04:45:20 PST 2009


Thanks so much for taking this on.

On the omit handling: it's very clear that I need to beef up how to 
control coverage.py's attention.  The current handling is simplistic.  
In fact, the current scheme doesn't make much sense: data is collected 
for all code, then at the end, a bunch of files are omitted from the 
report.  Better would be to ignore the files during data collection.

In addition, I'd like to add a .ini file for coverage.py to control all 
sorts of aspects of its execution, including which files to ignore.

So I want to make sure that these plug-ins play well with those (future) 
improvements to coverage.  I know this is a bit much to ask at this point.

Lastly, I'm trying to get my head around how to unit test this plug-in code!


Ross Lawley wrote:
> Hi,
> Thanks for the heads up about the repository.  I wasn't too sure what 
> the situation was with bitbucket as I'm new to hg, but seems very 
> similar to github work flows so all good there!  I found a good hg 
> manual: http://hgbook.red-bean.com/
> Anyway, I've branched off coveragepy and created a repo:
> http://bitbucket.org/rozza/coverage-test-runner/
> I've added runner.py which is a utility wrapper for test plugins. 
>  I've written a pytest and a nose plugin, I've use the pytest one 
> locally with my codebase and it works great.  I've tested the nose 
> plugin but haven't actually used it in anger - so it may need tweaking!
> Any feedback let me know - I'm not sure on the option parsing - you'll 
> see why!
> Another area of note is I've tweaked the file / code omit code:
> 1) So that I can use a file with each rule on a line or command line 
> comma separated as normal
> 2) I've moved the code_unit_factory file omit logic round so I could 
> monkey patch it which is in the plugins - so remove that if you don't 
> need it!  I know its not ideal it scratched my itch at the moment.
> Basically it means I can have a file in my repo that is used to filter 
> all files on all work environments (mac osx / unix) eg:
> conftest
> /tests/
> /usr/lib/python.*/.*.py
> /usr/local/lib/python.*/.*.py
> /usr/share/*
> /var/lib/python-support/.*
> /System/Library/*
> /Library/*
> /opt/subversion/*
> .*.html
> /tests/
> Which seems more suited to running a test suite.
> Ross
> ------------------------------------------------------------------------
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20091124/aaadf078/attachment.html>

More information about the testing-in-python mailing list