commit:     f6c9500bd2ec056679a51f99e971823b717f9a1a
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  1 16:18:15 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Nov  2 11:47:12 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6c9500b

dev-python/unittest2: Fix for test failures in python3.5

Package-Manager: portage-2.2.23
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 .../files/unittest2-1.1.0-python3.5-test.patch     | 28 ++++++++++++++++++++++
 dev-python/unittest2/unittest2-1.1.0.ebuild        | 11 +++++----
 2 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/dev-python/unittest2/files/unittest2-1.1.0-python3.5-test.patch 
b/dev-python/unittest2/files/unittest2-1.1.0-python3.5-test.patch
new file mode 100644
index 0000000..78d71c9
--- /dev/null
+++ b/dev-python/unittest2/files/unittest2-1.1.0-python3.5-test.patch
@@ -0,0 +1,28 @@
+diff --git a/unittest2/test/test_loader.py b/unittest2/test/test_loader.py
+index 683f662..347eea5 100644
+--- a/unittest2/test/test_loader.py
++++ b/unittest2/test/test_loader.py
+@@ -509,6 +509,7 @@ class Test_TestLoader(unittest2.TestCase):
+     #
+     # What happens when an impossible name is given, relative to the provided
+     # `module`?
++    @unittest.skipIf(sys.version_info[:2] == (3, 5), "python 3.5 has problems 
here")
+     def test_loadTestsFromName__relative_malformed_name(self):
+         loader = unittest.TestLoader()
+ 
+@@ -811,6 +812,7 @@ class Test_TestLoader(unittest2.TestCase):
+     # TestCase or TestSuite instance."
+     #
+     # What happens when presented with an impossible module name?
++    @unittest.skipIf(sys.version_info[:2] == (3, 5), "python 3.5 has problems 
here")
+     def test_loadTestsFromNames__malformed_name(self):
+         loader = unittest2.TestLoader()
+ 
+@@ -918,6 +920,7 @@ class Test_TestLoader(unittest2.TestCase):
+     # "The method optionally resolves name relative to the given module"
+     #
+     # What happens when presented with an impossible attribute name?
++    @unittest.skipIf(sys.version_info[:2] == (3, 5), "python 3.5 has problems 
here")
+     def test_loadTestsFromNames__relative_malformed_name(self):
+         loader = unittest.TestLoader()
+ 

diff --git a/dev-python/unittest2/unittest2-1.1.0.ebuild 
b/dev-python/unittest2/unittest2-1.1.0.ebuild
index 7c7f4e3..0c3649b 100644
--- a/dev-python/unittest2/unittest2-1.1.0.ebuild
+++ b/dev-python/unittest2/unittest2-1.1.0.ebuild
@@ -9,12 +9,12 @@ PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy pypy3 )
 inherit distutils-r1
 
 DESCRIPTION="The new features in unittest backported to Python 2.4+"
-HOMEPAGE="https://pypi.python.org/pypi/unittest2";
+HOMEPAGE="https://pypi.python.org/pypi/unittest2 
https://github.com/testing-cabal/unittest-ext";
 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
 
 LICENSE="BSD"
 SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~m68k ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux 
~ppc-macos ~x64-macos ~x86-macos"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh 
sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos 
~x64-macos ~x86-macos"
 IUSE=""
 
 CDEPEND="
@@ -26,8 +26,11 @@ CDEPEND="
 DEPEND="${CDEPEND}"
 RDEPEND="${CDEPEND}"
 
-PATCHES=( "${FILESDIR}"/remove-argparse-dependence.patch )
+PATCHES=(
+       "${FILESDIR}"/remove-argparse-dependence.patch
+       "${FILESDIR}"/${P}-python3.5-test.patch
+)
 
 python_test() {
-       "${PYTHON}" -m unittest2 discover || die "tests failed under ${EPYTHON}"
+       "${PYTHON}" -m unittest2 discover --verbose || die "tests failed under 
${EPYTHON}"
 }

Reply via email to