[Python-modules-commits] [nose] 01/01: Add a patch to fix test failures with Python 3.6.
Dmitry Shachnev
mitya57 at moszumanska.debian.org
Mon Oct 30 20:47:20 UTC 2017
This is an automated email from the git hooks/post-receive script.
mitya57 pushed a commit to branch debian/master
in repository nose.
commit 3d47b8f1bf14032103782d5a3a9f65220dc5b983
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date: Mon Oct 30 23:46:48 2017 +0300
Add a patch to fix test failures with Python 3.6.
Closes: #880232.
---
debian/changelog | 6 +++
debian/patches/python3.6-modulenotfounderror.diff | 65 +++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 72 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 722a961..a8da797 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+nose (1.3.7-3) UNRELEASED; urgency=medium
+
+ * Add a patch to fix test failures with Python 3.6 (closes: #880232).
+
+ -- Dmitry Shachnev <mitya57 at debian.org> Mon, 30 Oct 2017 23:46:01 +0300
+
nose (1.3.7-2) unstable; urgency=medium
* Add a patch to make coverage plugin compatible with python-coverage 4.1
diff --git a/debian/patches/python3.6-modulenotfounderror.diff b/debian/patches/python3.6-modulenotfounderror.diff
new file mode 100644
index 0000000..18c0437
--- /dev/null
+++ b/debian/patches/python3.6-modulenotfounderror.diff
@@ -0,0 +1,65 @@
+From: Dmitry Shachnev <mitya57 at gmail.com>
+Date: Mon, 30 Oct 2017 23:40:34 +0300
+Subject: Fix failures with Python 3.6 related to the new ModuleNotFoundError
+ class
+
+---
+ 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 81aaa7b..3f82122 100644
+--- a/functional_tests/test_loader.py
++++ b/functional_tests/test_loader.py
+@@ -369,7 +369,7 @@ class TestNoseTestLoader(unittest.TestCase):
+ 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..1362c90 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: ...Error (No module ...apackagethatdoesntexist...) ... ERROR
+ #2 test_b.test ... ok
+ #3 test_b.test_fail ... FAIL
+ <BLANKLINE>
+ ======================================================================
+- ERROR: Failure: ImportError (No module ...apackagethatdoesntexist...)
++ ERROR: Failure: ...Error (No module ...apackagethatdoesntexist...)
+ ----------------------------------------------------------------------
+ Traceback (most recent call last):
+ ...
+- ImportError: No module ...apackagethatdoesntexist...
++ ...Error: 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: ...Error (No module ...apackagethatdoesntexist...) ... ERROR
+ <BLANKLINE>
+ ======================================================================
+- ERROR: Failure: ImportError (No module ...apackagethatdoesntexist...)
++ ERROR: Failure: ...Error (No module ...apackagethatdoesntexist...)
+ ----------------------------------------------------------------------
+ Traceback (most recent call last):
+ ...
+- ImportError: No module ...apackagethatdoesntexist...
++ ...Error: No module ...apackagethatdoesntexist...
+ <BLANKLINE>
+ ----------------------------------------------------------------------
+ Ran 1 test in ...s
diff --git a/debian/patches/series b/debian/patches/series
index d39fdc5..46ca507 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ no-distribute_setup.diff
disable-unstable-tests.diff
python3.5-qualname.diff
coverage4.1.diff
+python3.6-modulenotfounderror.diff
--
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