summaryrefslogtreecommitdiff
path: root/dev-python/coverage/coverage-4.5.4.ebuild
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2019-11-15 23:57:33 -0800
committerPatrick McLean <chutzpah@gentoo.org>2019-11-15 23:57:33 -0800
commit8b121a58741c04aea2468260ca1c1bb1b815740e (patch)
tree2ba149325833b614be664e45b76ebb0bf8c3ee26 /dev-python/coverage/coverage-4.5.4.ebuild
parent84e0ef5095721bf92f5f370259c52b644ff40bec (diff)
downloadgentoo-8b121a58741c04aea2468260ca1c1bb1b815740e.tar.gz
gentoo-8b121a58741c04aea2468260ca1c1bb1b815740e.tar.bz2
gentoo-8b121a58741c04aea2468260ca1c1bb1b815740e.zip
dev-python/coverage: Fix tests with cpython in 4.5.4
Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-python/coverage/coverage-4.5.4.ebuild')
-rw-r--r--dev-python/coverage/coverage-4.5.4.ebuild26
1 files changed, 22 insertions, 4 deletions
diff --git a/dev-python/coverage/coverage-4.5.4.ebuild b/dev-python/coverage/coverage-4.5.4.ebuild
index f6b95bdeabdb..75ac87bd7a1a 100644
--- a/dev-python/coverage/coverage-4.5.4.ebuild
+++ b/dev-python/coverage/coverage-4.5.4.ebuild
@@ -28,9 +28,15 @@ BDEPEND="
)
"
+DISTUTILS_IN_SOURCE_BUILD=1
+
+PATCHES=(
+ "${FILESDIR}/coverage-4.5.4-tests.patch"
+)
+
src_prepare() {
- # avoid the dep on xdist
- sed -i -e '/^addopts/s:-n3::' setup.cfg || die
+ # avoid the dep on xdist, run tests verbosely
+ sed -i -e '/^addopts/s:-n3:-v:' setup.cfg || die
distutils-r1_src_prepare
}
@@ -45,6 +51,18 @@ python_compile() {
python_test() {
distutils_install_for_testing
- "${EPYTHON}" igor.py test_with_tracer py || die
- "${EPYTHON}" igor.py test_with_tracer c || die
+ local bindir=${TEST_DIR}/scripts
+
+ pushd tests/eggsrc >/dev/null || die
+ distutils_install_for_testing
+ popd >/dev/null || die
+
+ "${EPYTHON}" igor.py zip_mods || die
+ PATH="${bindir}:${PATH}" "${EPYTHON}" igor.py test_with_tracer py || die
+
+ # No C extensions under pypy
+ if [[ ${EPYTHON} != pypy* ]]; then
+ cp -l -- "${TEST_DIR}"/lib/*/coverage/*.so coverage/ || die
+ PATH="${bindir}:${PATH}" "${EPYTHON}" igor.py test_with_tracer c || die
+ fi
}