Skip to content

Commit

Permalink
Sort imports and improve docstrings, esp. on --cov. Ref #282.
Browse files Browse the repository at this point in the history
  • Loading branch information
ionelmc committed May 2, 2019
1 parent 4082617 commit cad2e12
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/pytest_cov/plugin.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
"""Coverage plugin for pytest."""
import argparse
import os
import warnings

import pytest
import argparse

from coverage.misc import CoverageException

from . import compat
from . import embed
from . import engine
from . import compat


class CoverageError(Exception):
Expand Down Expand Up @@ -53,20 +52,20 @@ def pytest_addoption(parser):

group = parser.getgroup(
'cov', 'coverage reporting with distributed testing support')
group.addoption('--cov', action='append', default=[], metavar='path',
group.addoption('--cov', action='append', default=[], metavar='SOURCE',
nargs='?', const=True, dest='cov_source',
help='Measure coverage for filesystem path. '
'(multi-allowed)')
help='Path or package name to measure during execution (multi-allowed). '
'Use --cov= to not do any source filtering and record everything.')
group.addoption('--cov-report', action=StoreReport, default={},
metavar='type', type=validate_report,
metavar='TYPE', type=validate_report,
help='Type of report to generate: term, term-missing, '
'annotate, html, xml (multi-allowed). '
'term, term-missing may be followed by ":skip-covered". '
'annotate, html and xml may be followed by ":DEST" '
'where DEST specifies the output location. '
'Use --cov-report= to not generate any output.')
'annotate, html, xml (multi-allowed). '
'term, term-missing may be followed by ":skip-covered". '
'annotate, html and xml may be followed by ":DEST" '
'where DEST specifies the output location. '
'Use --cov-report= to not generate any output.')
group.addoption('--cov-config', action='store', default='.coveragerc',
metavar='path',
metavar='PATH',
help='Config file for coverage. Default: .coveragerc')
group.addoption('--no-cov-on-fail', action='store_true', default=False,
help='Do not report coverage if test run fails. '
Expand Down

0 comments on commit cad2e12

Please sign in to comment.