commit: 25b1b4f492f813c6c92a8c10bdbe73662f3edb1b Author: Virgil Dupras <vdupras <AT> gentoo <DOT> org> AuthorDate: Wed May 8 14:40:02 2019 +0000 Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org> CommitDate: Wed May 8 14:41:17 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25b1b4f4
dev-python/xlutils: add py3 compat Also, fix tests. Closes: https://bugs.gentoo.org/655826 Closes: https://bugs.gentoo.org/663412 Signed-off-by: Virgil Dupras <vdupras <AT> gentoo.org> Package-Manager: Portage-2.3.62, Repoman-2.3.11 .../xlutils/files/xlutils-2.0.0-fix-tests.patch | 23 ++++++++++++++++++++++ ...lutils-2.0.0.ebuild => xlutils-2.0.0-r1.ebuild} | 23 ++++++++++++++-------- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/dev-python/xlutils/files/xlutils-2.0.0-fix-tests.patch b/dev-python/xlutils/files/xlutils-2.0.0-fix-tests.patch new file mode 100644 index 00000000000..b7e74925095 --- /dev/null +++ b/dev-python/xlutils/files/xlutils-2.0.0-fix-tests.patch @@ -0,0 +1,23 @@ +From e9edf279ba2e699be92da7611368cf92b4d87cec Mon Sep 17 00:00:00 2001 +From: Chris Withers <[email protected]> +Date: Wed, 4 Apr 2018 08:05:06 +0100 +Subject: [PATCH] fix test expectations + +--- + xlutils/tests/test_view.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/xlutils/tests/test_view.py b/xlutils/tests/test_view.py +index 7b32892..5b4aa2b 100644 +--- a/xlutils/tests/test_view.py ++++ b/xlutils/tests/test_view.py +@@ -219,6 +219,8 @@ def test_does_not_match(self): + ('XX',) + + actual: +-(u'',)''' ++(u'',) ++ ++While comparing [5][1]: 'XX' (expected) != u'' (actual)''' + + compare(expected, actual=str(s.raised)) diff --git a/dev-python/xlutils/xlutils-2.0.0.ebuild b/dev-python/xlutils/xlutils-2.0.0-r1.ebuild similarity index 51% rename from dev-python/xlutils/xlutils-2.0.0.ebuild rename to dev-python/xlutils/xlutils-2.0.0-r1.ebuild index d701317d102..1da8b0f0d4b 100644 --- a/dev-python/xlutils/xlutils-2.0.0.ebuild +++ b/dev-python/xlutils/xlutils-2.0.0-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -PYTHON_COMPAT=( python2_7 ) +PYTHON_COMPAT=( python2_7 python3_{5,6} ) inherit distutils-r1 @@ -18,18 +18,25 @@ LICENSE="MIT" SLOT="0" RDEPEND=" - dev-python/xlwt[${PYTHON_USEDEP}] - dev-python/xlrd[${PYTHON_USEDEP}]" + >=dev-python/xlwt-1.3[${PYTHON_USEDEP}] + >=dev-python/xlrd-1.2[${PYTHON_USEDEP}]" DEPEND="${RDEPEND} test? ( - dev-python/errorhandler[${PYTHON_USEDEP}] - dev-python/manuel[${PYTHON_USEDEP}] + >=dev-python/errorhandler-2[${PYTHON_USEDEP}] + >=dev-python/manuel-1.9[${PYTHON_USEDEP}] dev-python/mock[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] dev-python/pytest[${PYTHON_USEDEP}] dev-python/testfixtures[${PYTHON_USEDEP}] )" +PATCHES=( + "${FILESDIR}/${PN}-2.0.0-fix-tests.patch" +) + python_test() { - py.test -v xlutils/tests || die "Tests fail with ${EPYTHON}" + # upstream runs its tests with nose, but the suite actually runs better + # when ran through pytest... + pytest -vv || die "Tests fail with ${EPYTHON}" }
