| 1 |
======================= |
| 2 |
Test coverage reporting |
| 3 |
======================= |
| 4 |
|
| 5 |
.. autoplugin :: nose2.plugins.coverage.Coverage |
| 6 |
|
| 7 |
Differences From coverage |
| 8 |
------------------------- |
| 9 |
|
| 10 |
The ``coverage`` tool is the basis for nose2's coverage reporting. nose2 will |
| 11 |
seek to emulate ``coverage`` behavior whenever possible, but there are known |
| 12 |
cases where this is not feasible. |
| 13 |
|
| 14 |
If you need the exact behaviors of ``coverage``, consider having ``coverage`` |
| 15 |
invoke ``nose2``. |
| 16 |
|
| 17 |
Otherwise, please be aware of the following known differences: |
| 18 |
|
| 19 |
- The ``fail_under`` parameter results in an exit status of 2 for ``coverage``, |
| 20 |
but an exit status of 1 for ``nose2`` |
| 21 |
|
| 22 |
Compatibility with mp plugin |
| 23 |
---------------------------- |
| 24 |
|
| 25 |
The ``coverage`` and ``mp`` plugins may be used in conjunction to enable |
| 26 |
multiprocess testing with coverage reporting. |
| 27 |
|
| 28 |
Special instructions: |
| 29 |
|
| 30 |
- Due to the way the plugin is reloaded in subprocesses, command-line options |
| 31 |
for the ``coverage`` plugin have no effect. If you need to change any |
| 32 |
``coverage`` plugin options, use a configuration file. |
| 33 |
- Do *not* use the ``concurrency`` option within a ``.coveragerc`` file ; this |
| 34 |
interferes with the ``coverage`` plugin, which automatically handles |
| 35 |
multiprocess coverage reporting. |