commit: 57fe81e30629df5f2bee32aa4cf834022fe67fbe
Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Sun Mar 29 12:01:46 2020 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Sun Mar 29 12:01:46 2020 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=57fe81e3
dev-python/pytest-benchmark: tried and failed to fix tests
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
dev-python/pytest-benchmark/pytest-benchmark-3.2.3.ebuild | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/dev-python/pytest-benchmark/pytest-benchmark-3.2.3.ebuild
b/dev-python/pytest-benchmark/pytest-benchmark-3.2.3.ebuild
index 82b9e64..5652413 100644
--- a/dev-python/pytest-benchmark/pytest-benchmark-3.2.3.ebuild
+++ b/dev-python/pytest-benchmark/pytest-benchmark-3.2.3.ebuild
@@ -3,7 +3,7 @@
EAPI="7"
-#DISTUTILS_USE_SETUPTOOLS=rdepend
+DISTUTILS_USE_SETUPTOOLS=rdepend
PYTHON_COMPAT=( python3_6 )
inherit distutils-r1
@@ -19,6 +19,11 @@ LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
+# during tests import fails because conflict with the already installed files
+# not sure how to fix, it would require setting some python variables but that
would
+# probably lead to all other packages being unfindable by the tests
+RESTRICT="test"
+
RDEPEND="
dev-python/py-cpuinfo[${PYTHON_USEDEP}]
"
@@ -39,3 +44,10 @@ BDEPEND="
distutils_enable_tests pytest
distutils_enable_sphinx docs dev-python/sphinx-py3doc-enhanced-theme
+
+python_test() {
+ # has to be run in source dir
+ PYTHONPATH="${S}"
+ cd "${S}" || die
+ pytest -vv || die "Tests fail with ${EPYTHON}"
+}