Skip to main content

Single command to create coverage reports (assumes a bin/test)

Project description

Createcoverage

This package installs one command: createcoverage that runs your tests with coverage.py and opens the coverage reports in your browser. All with just one single handy command.

Assumption: you’re using buildout. Or rather, the assumption is that you have a bin/test command that runs all your tests.

No options are passed to coverage.py, so any extra options you want to give to coverage must be put in a .coveragerc in your buildout’s root. This is a good idea in any case :-) An example .coveragerc that omits code you normally don’t want to include in a coverage report:

[report]
omit =
    /home/*/.buildout/eggs/*
    /usr/*
    parts/*
    eggs/*
    */test*

Installing createcoverage in a zc.recipe.egg section is enough. Createcoverage itself depends on coverage.py and makes sure bin/coverage is created:

[console_scripts]
recipe = zc.recipe.egg
eggs = createcoverage

Code, bugs, ideas

The code is hosted at bitbucket: https://bitbucket.org/reinout/createcoverage .

You can also report issues and bugs and ideas there.

Development installation

The first time, you’ll have to run the “bootstrap” script to set up setuptools and buildout:

$> python bootstrap.py

And then run buildout to set everything up:

$> bin/buildout

(On windows it is called bin\buildout.exe).

You’ll have to re-run buildout when you or someone else made a change in setup.py or buildout.cfg.

The current package is installed as a “development package”, so changes in .py files are automatically available (just like with python setup.py develop).

Tests can always be run with bin/test or bin\test.exe.

TODO

  • Probably a whole lot of things.

Credits

Created by Reinout van Rees.

Changelog of createcoverage

0.3 (2010-09-20)

  • Added missing MANIFEST.in file so that the distribution on pypi is complete now.

0.2 (2010-09-20)

  • Documentation update: pointing at bitbucket for code, issues, ideas.

0.1 (2010-09-20)

  • First working version.

  • Copied some code from the “createzopecoverage” package.

  • Initial library skeleton created by nensskel. [reinout]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

createcoverage-0.3.tar.gz (17.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page