Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/unittest2/, dev-python/unittest2/files/
Date: Mon, 02 Nov 2015 11:50:49
Message-Id: 1446464832.f6c9500bd2ec056679a51f99e971823b717f9a1a.jlec@gentoo
1 commit: f6c9500bd2ec056679a51f99e971823b717f9a1a
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 1 16:18:15 2015 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 2 11:47:12 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6c9500b
7
8 dev-python/unittest2: Fix for test failures in python3.5
9
10 Package-Manager: portage-2.2.23
11 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
12
13 .../files/unittest2-1.1.0-python3.5-test.patch | 28 ++++++++++++++++++++++
14 dev-python/unittest2/unittest2-1.1.0.ebuild | 11 +++++----
15 2 files changed, 35 insertions(+), 4 deletions(-)
16
17 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
18 new file mode 100644
19 index 0000000..78d71c9
20 --- /dev/null
21 +++ b/dev-python/unittest2/files/unittest2-1.1.0-python3.5-test.patch
22 @@ -0,0 +1,28 @@
23 +diff --git a/unittest2/test/test_loader.py b/unittest2/test/test_loader.py
24 +index 683f662..347eea5 100644
25 +--- a/unittest2/test/test_loader.py
26 ++++ b/unittest2/test/test_loader.py
27 +@@ -509,6 +509,7 @@ class Test_TestLoader(unittest2.TestCase):
28 + #
29 + # What happens when an impossible name is given, relative to the provided
30 + # `module`?
31 ++ @unittest.skipIf(sys.version_info[:2] == (3, 5), "python 3.5 has problems here")
32 + def test_loadTestsFromName__relative_malformed_name(self):
33 + loader = unittest.TestLoader()
34 +
35 +@@ -811,6 +812,7 @@ class Test_TestLoader(unittest2.TestCase):
36 + # TestCase or TestSuite instance."
37 + #
38 + # What happens when presented with an impossible module name?
39 ++ @unittest.skipIf(sys.version_info[:2] == (3, 5), "python 3.5 has problems here")
40 + def test_loadTestsFromNames__malformed_name(self):
41 + loader = unittest2.TestLoader()
42 +
43 +@@ -918,6 +920,7 @@ class Test_TestLoader(unittest2.TestCase):
44 + # "The method optionally resolves name relative to the given module"
45 + #
46 + # What happens when presented with an impossible attribute name?
47 ++ @unittest.skipIf(sys.version_info[:2] == (3, 5), "python 3.5 has problems here")
48 + def test_loadTestsFromNames__relative_malformed_name(self):
49 + loader = unittest.TestLoader()
50 +
51
52 diff --git a/dev-python/unittest2/unittest2-1.1.0.ebuild b/dev-python/unittest2/unittest2-1.1.0.ebuild
53 index 7c7f4e3..0c3649b 100644
54 --- a/dev-python/unittest2/unittest2-1.1.0.ebuild
55 +++ b/dev-python/unittest2/unittest2-1.1.0.ebuild
56 @@ -9,12 +9,12 @@ PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy pypy3 )
57 inherit distutils-r1
58
59 DESCRIPTION="The new features in unittest backported to Python 2.4+"
60 -HOMEPAGE="https://pypi.python.org/pypi/unittest2"
61 +HOMEPAGE="https://pypi.python.org/pypi/unittest2 https://github.com/testing-cabal/unittest-ext"
62 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
63
64 LICENSE="BSD"
65 SLOT="0"
66 -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"
67 +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"
68 IUSE=""
69
70 CDEPEND="
71 @@ -26,8 +26,11 @@ CDEPEND="
72 DEPEND="${CDEPEND}"
73 RDEPEND="${CDEPEND}"
74
75 -PATCHES=( "${FILESDIR}"/remove-argparse-dependence.patch )
76 +PATCHES=(
77 + "${FILESDIR}"/remove-argparse-dependence.patch
78 + "${FILESDIR}"/${P}-python3.5-test.patch
79 +)
80
81 python_test() {
82 - "${PYTHON}" -m unittest2 discover || die "tests failed under ${EPYTHON}"
83 + "${PYTHON}" -m unittest2 discover --verbose || die "tests failed under ${EPYTHON}"
84 }