[Python-modules-commits] [nose] 01/03: Make coverage plugin compatible with Coverage.py 4.1

Dmitry Shachnev mitya57 at moszumanska.debian.org
Wed Jun 29 10:28:15 UTC 2016


This is an automated email from the git hooks/post-receive script.

mitya57 pushed a commit to branch master
in repository nose.

commit bec238f776c0121d7be097b4e8e6b965f90d9375
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date:   Wed Jun 29 13:15:16 2016 +0300

    Make coverage plugin compatible with Coverage.py 4.1
    
    According to the Coverage.py 4.1 changelog:
    
    - 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.
    
    Without that option, four tests in nose fail:
    
    - test_coverage_plugin.TestCoverageMinPercentagePlugin
    - test_coverage_plugin.TestCoverageMinPercentageSinglePackagePlugin
    - test_coverage_plugin.TestCoverageMinPercentageSinglePackageWithBranchesPlugin
    - test_coverage_plugin.TestCoveragePlugin
---
 nose/plugins/cover.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nose/plugins/cover.py b/nose/plugins/cover.py
index fbe2e30..b9bfc82 100644
--- a/nose/plugins/cover.py
+++ b/nose/plugins/cover.py
@@ -187,7 +187,7 @@ class Coverage(Plugin):
                     for name, module in sys.modules.items()
                     if self.wantModuleCoverage(name, module)]
         log.debug("Coverage report will cover modules: %s", modules)
-        self.coverInstance.report(modules, file=stream)
+        self.coverInstance.report(modules, file=stream, show_missing=True)
 
         import coverage
         if self.coverHtmlDir:
@@ -207,7 +207,7 @@ class Coverage(Plugin):
         # make sure we have minimum required coverage
         if self.coverMinPercentage:
             f = StringIO.StringIO()
-            self.coverInstance.report(modules, file=f)
+            self.coverInstance.report(modules, file=f, show_missing=True)
 
             multiPackageRe = (r'-------\s\w+\s+\d+\s+\d+(?:\s+\d+\s+\d+)?'
                               r'\s+(\d+)%\s+\d*\s{0,1}$')

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/nose.git



More information about the Python-modules-commits mailing list