summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.rst8
-rw-r--r--coverage/control.py4
-rw-r--r--tests/coveragetest.py2
-rw-r--r--tests/test_api.py2
-rw-r--r--tests/test_plugins.py4
5 files changed, 14 insertions, 6 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index ff04775b..923993b6 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -42,6 +42,13 @@ Unreleased
- Officially support PyPy 5.1, which required no changes, just updates to the
docs.
+- The `coverage.report` function had two parameters with non-None defaults,
+ which have been changed. `show_missing` used to default to True, but now
+ defaults to None. If you had been calling `coverage.report` without
+ specifying `show_missing`, you'll need to explicitly set it to True to keep
+ the same behavior. `skip_covered` used to default to False. It is now None,
+ which doesn't change the behavior. This fixes `issue 485`_.
+
- It's never been possible to pass a namespace module to one of the analysis
functions, but now at least we raise a more specific error message, rather
than getting confused. (`issue 456`_)
@@ -62,6 +69,7 @@ Unreleased
.. _issue 475: https://bitbucket.org/ned/coveragepy/issues/475/generator-expression-is-marked-as-not
.. _issue 479: https://bitbucket.org/ned/coveragepy/issues/479/clarify-the-need-for-the-c-extension
.. _issue 481: https://bitbucket.org/ned/coveragepy/issues/481/asyncioprocesspoolexecutor-tracing-not
+.. _issue 485: https://bitbucket.org/ned/coveragepy/issues/485/coveragereport-ignores-show_missing-and
Version 4.1b2 --- 2016-01-23
diff --git a/coverage/control.py b/coverage/control.py
index 3e180745..97d46250 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -941,9 +941,9 @@ class Coverage(object):
return file_reporters
def report(
- self, morfs=None, show_missing=True, ignore_errors=None,
+ self, morfs=None, show_missing=None, ignore_errors=None,
file=None, # pylint: disable=redefined-builtin
- omit=None, include=None, skip_covered=False,
+ omit=None, include=None, skip_covered=None,
):
"""Write a summary report to `file`.
diff --git a/tests/coveragetest.py b/tests/coveragetest.py
index d79aee7f..7625ce6c 100644
--- a/tests/coveragetest.py
+++ b/tests/coveragetest.py
@@ -258,7 +258,7 @@ class CoverageTest(
if report:
frep = StringIO()
- cov.report(mod, file=frep)
+ cov.report(mod, file=frep, show_missing=True)
rep = " ".join(frep.getvalue().split("\n")[2].split()[1:])
self.assertEqual(report, rep)
diff --git a/tests/test_api.py b/tests/test_api.py
index 4c038519..f849695c 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -548,7 +548,7 @@ class TestRunnerPluginTest(CoverageTest):
self.start_import_stop(cov, "no_biggie")
cov.combine()
cov.save()
- cov.report(["no_biggie.py"])
+ cov.report(["no_biggie.py"], show_missing=True)
self.assertEqual(self.stdout(), textwrap.dedent("""\
Name Stmts Miss Cover Missing
--------------------------------------------
diff --git a/tests/test_plugins.py b/tests/test_plugins.py
index 2129076a..fe43c4c0 100644
--- a/tests/test_plugins.py
+++ b/tests/test_plugins.py
@@ -408,7 +408,7 @@ class GoodPluginTest(FileTracerTest):
self.start_import_stop(cov, "caller")
repout = StringIO()
- total = cov.report(file=repout, include=["*.html"], omit=["uni*.html"])
+ total = cov.report(file=repout, include=["*.html"], omit=["uni*.html"], show_missing=True)
report = repout.getvalue().splitlines()
expected = [
'Name Stmts Miss Branch BrPart Cover Missing',
@@ -497,7 +497,7 @@ class GoodPluginTest(FileTracerTest):
self.start_import_stop(cov, "unsuspecting")
repout = StringIO()
- total = cov.report(file=repout)
+ total = cov.report(file=repout, show_missing=True)
report = repout.getvalue().splitlines()
expected = [
'Name Stmts Miss Cover Missing',