summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2017-10-24 07:17:11 -0400
committerNed Batchelder <ned@nedbatchelder.com>2017-10-24 07:17:11 -0400
commit26821ed8e6ea20925ab859bf5e06607f0861bb4c (patch)
treef5f705f292da442b0195fd05eb5e2dd1f9d35c28
parent0884bfddabbe7c1b7f9a97c15e20c1d08b3ec05c (diff)
downloadpython-coveragepy-26821ed8e6ea20925ab859bf5e06607f0861bb4c.tar.gz
Add the latest warning to the docs, and give them consistent punctuation
-rw-r--r--coverage/control.py2
-rw-r--r--doc/cmd.rst8
-rw-r--r--tests/test_process.py2
3 files changed, 9 insertions, 3 deletions
diff --git a/coverage/control.py b/coverage/control.py
index 33f2ef1..63c06e1 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -889,7 +889,7 @@ class Coverage(object):
# we never measured it. I guess that means it was imported before
# coverage even started.
self._warn(
- "Module %s was previously imported, but not measured." % pkg,
+ "Module %s was previously imported, but not measured" % pkg,
slug="module-not-measured",
)
diff --git a/doc/cmd.rst b/doc/cmd.rst
index dc70353..8dbe56e 100644
--- a/doc/cmd.rst
+++ b/doc/cmd.rst
@@ -165,12 +165,18 @@ could affect the measurement process. The possible warnings include:
This could be because you asked to measure only modules that never ran,
or for other reasons.
-* "Module XXX was previously imported, but not measured. (module-not-measured)"
+* "Module XXX was previously imported, but not measured (module-not-measured)"
You asked coverage.py to measure module XXX, but it had already been imported
when coverage started. This meant coverage.py couldn't monitor its
execution.
+* "--include is ignored because --source is set (include-ignored)"
+
+ Both ``--include`` and ``--source`` were specified while running code. Both
+ are meant to focus measurement on a particular part of your source code, so
+ ``--include`` is ignored in favor of ``--source``.
+
Individual warnings can be disabled with the `disable_warnings
<config_run_disable_warnings>`_ configuration setting. To silence "No data was
collected," add this to your .coveragerc file::
diff --git a/tests/test_process.py b/tests/test_process.py
index 6ec2758..720734a 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -651,7 +651,7 @@ class ProcessTest(CoverageTest):
out = self.run_command("python run_twice.py")
self.assertEqual(
out,
- "Coverage.py warning: Module foo was previously imported, but not measured. "
+ "Coverage.py warning: Module foo was previously imported, but not measured "
"(module-not-measured)\n"
)