dev-python/more-itertools: don't run tests from ${S}
authorLouis Sautier <sbraz@gentoo.org>
Tue, 17 Jul 2018 22:32:09 +0000 (00:32 +0200)
committerLouis Sautier <sbraz@gentoo.org>
Tue, 17 Jul 2018 22:38:34 +0000 (00:38 +0200)
It makes more sense to run tests from the build directory.

Bug: https://bugs.gentoo.org/661412
Package-Manager: Portage-2.3.43, Repoman-2.3.10

dev-python/more-itertools/more-itertools-4.2.0.ebuild

index fe30c3ead7fc5cc5007d927732e16a010afb578f..fc733c79dd013a68801c04dd9b7769d591a8ea43 100644 (file)
@@ -37,6 +37,7 @@ python_compile_all() {
 
 python_test() {
        # Avoid ImportMismatchError, see https://bugs.gentoo.org/661412
-       PYTHONPATH=. py.test --doctest-modules more_itertools \
+       cd "${BUILD_DIR}/lib" || die
+       py.test --doctest-modules more_itertools \
                || die "tests fail with ${EPYTHON}"
 }