nosexcover

raw JSON →
1.0.11 verified Mon Apr 27 auth: no python

nosexcover is a plugin for Nose that extends the built-in coverage plugin to generate Cobertura-style XML reports (coverage.xml) via the `coverage.py` library. Version 1.0.11 is the latest release. The project is maintained but has very infrequent updates.

pip install nosexcover
error nosexcover requires nose to be installed.
cause The plugin depends on nose, which is not automatically installed as a dependency.
fix
Run 'pip install nose' before using nosexcover.
error ImportError: cannot import name 'Nosexcover' from 'nose.plugins.cover'
cause Incorrect import path. The class is in the nosexcover package, not in nose.
fix
Use 'from nosexcover import Nosexcover' instead.
gotcha nosexcover requires nose to be installed. It does not work with pytest or other test runners.
fix Use nosetests as the test runner.
gotcha The --with-xcoverage flag must be used in combination with --with-coverage (or the default coverage plugin) to actually record coverage data.
fix Include --with-coverage in your nosetests command.
gotcha If you use both --with-xcoverage and --cover-erase, the coverage.xml report may be empty because coverage data is erased after each run.
fix Avoid --cover-erase when using --with-xcoverage.

After installing, run nosetests with --with-xcoverage to generate cobertura-style XML.

pip install nosexcover
nosetests --with-xcoverage --with-coverage --cover-package=mypackage