[TIP] nose/py.test plugins

Ross Lawley ross.lawley at gmail.com
Fri Nov 20 04:30:15 PST 2009


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20091120/2eae7a93/attachment.html>


More information about the testing-in-python mailing list