Note
Newer versions of coverage contain their own nose plugin which is superior to the builtin plugin. It exposes more of coverage’s options and uses coverage’s native html output. Depending on the version of coverage installed, the included plugin may override the nose builtin plugin, or be available under a different name. Check nosetests --help or nosetests --plugins to find out which coverage plugin is available on your system.
If you have Ned Batchelder’s coverage module installed, you may activate a coverage report with the --with-coverage switch or NOSE_WITH_COVERAGE environment variable. The coverage report will cover any python source module imported after the start of the test run, excluding modules that match testMatch. If you want to include those modules too, use the --cover-tests switch, or set the NOSE_COVER_TESTS environment variable to a true value. To restrict the coverage report to modules from a particular package or packages, use the --cover-packages switch or the NOSE_COVER_PACKAGES environment variable.
Enable plugin Coverage: Activate a coverage report using Ned Batchelder’s coverage module. [NOSE_WITH_COVERAGE]
Restrict coverage output to selected packages [NOSE_COVER_PACKAGE]
Erase previously collected coverage statistics before run
Include test modules in coverage report [NOSE_COVER_TESTS]
Include all python files under working directory in coverage report. Useful for discovering holes in test coverage if not all files are imported by the test suite. [NOSE_COVER_INCLUSIVE]
Produce HTML coverage information
Produce HTML coverage information in dir
Bases: nose.plugins.base.Plugin
Activate a coverage report using Ned Batchelder’s coverage module.
Begin recording coverage information.
Configure plugin.
Add options to command line.
Output code coverage report.
If inclusive coverage enabled, return true for all source files in wanted packages.