summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Rasmus Thomsen <Rasmus.thomsen@protonmail.com> 2017-09-17 18:06:54 +0200
committerAvatar Heiko Becker <heirecka@exherbo.org> 2017-09-19 20:52:52 +0200
commit5482fd18fc398b3c47d343a2bc7e674b0ce0abb3 (patch)
treedc753f32f75b063cc39e474490f132b5e58162d4
parent1ab1aaa06ecddf562fe39d192dd8561230e1cd61 (diff)
downloadpython-5482fd18fc398b3c47d343a2bc7e674b0ce0abb3.tar.gz
python-5482fd18fc398b3c47d343a2bc7e674b0ce0abb3.tar.xz
dev-python/nose: fix tests
Change-Id: Idaebf558e8161afc8807ca47ccaac49e0f05eedb Reviewed-on: https://galileo.mailstation.de/gerrit/10077 Reviewed-by: Jenkins <wk@mailstation.de> Reviewed-by: Heiko Becker <heirecka@exherbo.org>
-rw-r--r--packages/dev-python/nose/files/Make-coverage-plugin-compatible-with-Coverage.py-4.1.patch46
-rw-r--r--packages/dev-python/nose/nose-1.3.7.exheres-01
2 files changed, 47 insertions, 0 deletions
diff --git a/packages/dev-python/nose/files/Make-coverage-plugin-compatible-with-Coverage.py-4.1.patch b/packages/dev-python/nose/files/Make-coverage-plugin-compatible-with-Coverage.py-4.1.patch
new file mode 100644
index 0000000..952a115
--- /dev/null
+++ b/packages/dev-python/nose/files/Make-coverage-plugin-compatible-with-Coverage.py-4.1.patch
@@ -0,0 +1,46 @@
+Source: Debian
+From bec238f776c0121d7be097b4e8e6b965f90d9375 Mon Sep 17 00:00:00 2001
+From: Dmitry Shachnev <mitya57@gmail.com>
+Date: Wed, 29 Jun 2016 13:15:16 +0300
+Subject: 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}$')
diff --git a/packages/dev-python/nose/nose-1.3.7.exheres-0 b/packages/dev-python/nose/nose-1.3.7.exheres-0
index 7300159..49bbe6a 100644
--- a/packages/dev-python/nose/nose-1.3.7.exheres-0
+++ b/packages/dev-python/nose/nose-1.3.7.exheres-0
@@ -26,6 +26,7 @@ DEPENDENCIES="
DEFAULT_SRC_PREPARE_PATCHES=(
"${FILES}"/84bb82245d10798825439dc13846eb0538d84239.patch
"${FILES}"/8e7ad3d50012688ca029d126cbc88251831fea88.patch
+ "${FILES}"/Make-coverage-plugin-compatible-with-Coverage.py-4.1.patch
)
SETUP_PY_SRC_INSTALL_PARAMS=( --install-data /usr/share )