Provides single script to create coverage reports
createzopecoverage provides a bin/createzopecoverage script that serves as a one-line coverage report generator. It is essentially a wrapper around z3c.coverage. It is intended for use inside buildouts, so there are two assumptions:
And yes, it assumes a z3c.coverage, so a zope test setup. It doesn’t work with a “regular” coverage.py setup.
To install, add createzopecoverage to a zc.recipe.egg section. You often already have one for common scripts. So something like this:
[buildout] ... parts = ... console_scripts [console_scripts] recipe = zc.recipe.egg eggs = ... createzopecoverage
alternatively you may use:
[buildout] ... parts = ... createzopecoverage [createzopecoverage] recipe = createzopecoverage
(Note: you can name your part differently and the binary will be named after that part).
This gives you a bin/createzopecoverage script that does the following:
z3c.coverage uses the “enscript” command for python code highlighting. The version provided by OSX before 10.5.7 complains about an unkown --footer argument passed by z3c.coverage. There are two possible solutions:
Update to 10.5.7. That update came out a few minutes after I wrote this original comment :-)
Install enscript from macports.
Add a script called “enscript” on your path that calls the original enscript minus the offending argument:
#!/bin/sh shift /usr/bin/enscript -q --header -h --language=html --color -o - $9
Technical details and a full doctest are in createzopecoverage/USAGE.txt.
Made by Reinout van Rees.
Buildout recipe install option made by Michael Howitz.