summaryrefslogtreecommitdiff
path: root/coverage/cmdline.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/cmdline.py')
-rw-r--r--coverage/cmdline.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py
index 7b86054e..fba1112f 100644
--- a/coverage/cmdline.py
+++ b/coverage/cmdline.py
@@ -1,5 +1,5 @@
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
-# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
+# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
"""Command-line support for coverage.py."""
@@ -44,7 +44,7 @@ class Opts(object):
)
debug = optparse.make_option(
'', '--debug', action='store', metavar="OPTS",
- help="Debug options, separated by commas",
+ help="Debug options, separated by commas. [env: COVERAGE_DEBUG]",
)
directory = optparse.make_option(
'-d', '--directory', action='store', metavar="DIR",
@@ -115,7 +115,11 @@ class Opts(object):
)
rcfile = optparse.make_option(
'', '--rcfile', action='store',
- help="Specify configuration file. Defaults to '.coveragerc'",
+ help=(
+ "Specify configuration file. "
+ "By default '.coveragerc', 'setup.cfg' and 'tox.ini' are tried. "
+ "[env: COVERAGE_RCFILE]"
+ ),
)
source = optparse.make_option(
'', '--source', action='store', metavar="SRC1,SRC2,...",
@@ -124,7 +128,7 @@ class Opts(object):
timid = optparse.make_option(
'', '--timid', action='store_true',
help=(
- "Use a simpler but slower trace method. Try this if you get "
+ "Use a simpler but slower trace method. Try this if you get "
"seemingly impossible results!"
),
)
@@ -475,6 +479,7 @@ class CoverageScript(object):
include=include,
debug=debug,
concurrency=options.concurrency,
+ check_preimported=True,
)
if options.action == "debug":
@@ -654,9 +659,9 @@ class CoverageScript(object):
print(" %s" % line)
elif info == 'data':
self.coverage.load()
- data = self.coverage.data
+ data = self.coverage.get_data()
print(info_header("data"))
- print("path: %s" % self.coverage.data_files.filename)
+ print("path: %s" % self.coverage._data_files.filename)
if data:
print("has_arcs: %r" % data.has_arcs())
summary = data.line_counts(fullpath=True)