* [gentoo-commits] repo/gentoo:master commit in: dev-python/nose/, dev-python/nose/files/
@ 2017-03-28 22:30 Zac Medico
0 siblings, 0 replies; only message in thread
From: Zac Medico @ 2017-03-28 22:30 UTC (permalink / raw
To: gentoo-commits
commit: 36631728b23c15e9fdc2db85808ab4eb520dd6a3
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 28 22:22:37 2017 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Mar 28 22:30:41 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36631728
dev-python/nose: fix tests for python3.6 (bug 613534)
Package-Manager: Portage-2.3.5, Repoman-2.3.2
.../nose/files/nose-1.3.7-python-3.6-test.patch | 67 ++++++++++++++++++++++
dev-python/nose/nose-1.3.7-r3.ebuild | 2 +
2 files changed, 69 insertions(+)
diff --git a/dev-python/nose/files/nose-1.3.7-python-3.6-test.patch b/dev-python/nose/files/nose-1.3.7-python-3.6-test.patch
new file mode 100644
index 00000000000..eda10ff036c
--- /dev/null
+++ b/dev-python/nose/files/nose-1.3.7-python-3.6-test.patch
@@ -0,0 +1,67 @@
+From 84bb82245d10798825439dc13846eb0538d84239 Mon Sep 17 00:00:00 2001
+From: Tomas Orsava <torsava@redhat.com>
+Date: Mon, 12 Dec 2016 14:35:50 +0100
+Subject: [PATCH] Fix compatibility with Python 3.6
+
+Python 3.6 returns ModuleNotFoundError instead of the previous ImportError.
+https://github.com/nose-devs/nose/pull/1029
+---
+ functional_tests/test_loader.py | 2 +-
+ functional_tests/test_withid_failures.rst | 12 ++++++------
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/functional_tests/test_loader.py b/functional_tests/test_loader.py
+index 104f220..906e2ba 100644
+--- a/functional_tests/test_loader.py
++++ b/functional_tests/test_loader.py
+@@ -372,7 +372,7 @@ def test_failed_import_module_name(self):
+ assert res.errors, "Expected errors but got none"
+ assert not res.failures, res.failures
+ err = res.errors[0][0].test.exc_class
+- assert err is ImportError, \
++ assert issubclass(err, ImportError), \
+ "Expected import error, got %s" % err
+
+ def test_load_nonsense_name(self):
+diff --git a/functional_tests/test_withid_failures.rst b/functional_tests/test_withid_failures.rst
+index cf09d4f..cb20886 100644
+--- a/functional_tests/test_withid_failures.rst
++++ b/functional_tests/test_withid_failures.rst
+@@ -7,16 +7,16 @@
+ >>> support = os.path.join(os.path.dirname(__file__), 'support', 'id_fails')
+ >>> argv = [__file__, '-v', '--with-id', '--id-file', idfile, support]
+ >>> run(argv=argv, plugins=[TestId()]) # doctest: +ELLIPSIS
+- #1 Failure: ImportError (No module ...apackagethatdoesntexist...) ... ERROR
++ #1 Failure: ... (No module ...apackagethatdoesntexist...) ... ERROR
+ #2 test_b.test ... ok
+ #3 test_b.test_fail ... FAIL
+ <BLANKLINE>
+ ======================================================================
+- ERROR: Failure: ImportError (No module ...apackagethatdoesntexist...)
++ ERROR: Failure: ... (No module ...apackagethatdoesntexist...)
+ ----------------------------------------------------------------------
+ Traceback (most recent call last):
+ ...
+- ImportError: No module ...apackagethatdoesntexist...
++ ...: No module ...apackagethatdoesntexist...
+ <BLANKLINE>
+ ======================================================================
+ FAIL: test_b.test_fail
+@@ -35,14 +35,14 @@ Addressing failures works (sometimes).
+ >>> argv.append('1')
+ >>> _junk = sys.modules.pop('test_a', None) # 2.3 requires
+ >>> run(argv=argv, plugins=[TestId()]) #doctest: +ELLIPSIS
+- #1 Failure: ImportError (No module ...apackagethatdoesntexist...) ... ERROR
++ #1 Failure: ... (No module ...apackagethatdoesntexist...) ... ERROR
+ <BLANKLINE>
+ ======================================================================
+- ERROR: Failure: ImportError (No module ...apackagethatdoesntexist...)
++ ERROR: Failure: ... (No module ...apackagethatdoesntexist...)
+ ----------------------------------------------------------------------
+ Traceback (most recent call last):
+ ...
+- ImportError: No module ...apackagethatdoesntexist...
++ ...: No module ...apackagethatdoesntexist...
+ <BLANKLINE>
+ ----------------------------------------------------------------------
+ Ran 1 test in ...s
diff --git a/dev-python/nose/nose-1.3.7-r3.ebuild b/dev-python/nose/nose-1.3.7-r3.ebuild
index ea7cb29cdbd..e58e73ded7d 100644
--- a/dev-python/nose/nose-1.3.7-r3.ebuild
+++ b/dev-python/nose/nose-1.3.7-r3.ebuild
@@ -37,6 +37,8 @@ PATCHES=(
# Patch against master found in an upstream PR, backported:
# https://github.com/nose-devs/nose/pull/1004
"${FILESDIR}"/${P}-coverage-4.1-support.patch
+
+ "${FILESDIR}"/${P}-python-3.6-test.patch
)
pkg_setup() {
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-28 22:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-28 22:30 [gentoo-commits] repo/gentoo:master commit in: dev-python/nose/, dev-python/nose/files/ Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox