commit:     e02da715d0ec8864974a94e61f0f21e3a6b9d08c
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Mon May 18 17:11:59 2020 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Mon May 18 17:11:59 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e02da715

dev-python/pytest-randomly: install before testing

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 .../pytest-randomly-3.3.1-r1.ebuild                |  8 +++-
 .../pytest-randomly/pytest-randomly-3.3.1.ebuild   | 47 ----------------------
 2 files changed, 6 insertions(+), 49 deletions(-)

diff --git a/dev-python/pytest-randomly/pytest-randomly-3.3.1-r1.ebuild 
b/dev-python/pytest-randomly/pytest-randomly-3.3.1-r1.ebuild
index be8f908..7aa75e0 100644
--- a/dev-python/pytest-randomly/pytest-randomly-3.3.1-r1.ebuild
+++ b/dev-python/pytest-randomly/pytest-randomly-3.3.1-r1.ebuild
@@ -18,7 +18,8 @@ 
SRC_URI="https://github.com/pytest-dev/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
 LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-
+IUSE="test"
+RESTRICT="!test? ( test )"
 RDEPEND="
        dev-python/docutils[${PYTHON_USEDEP}]
        dev-python/factory_boy[${PYTHON_USEDEP}]
@@ -43,4 +44,7 @@ DEPEND="
 #              $(python_gen_cond_dep 
'dev-python/check-manifest[${PYTHON_USEDEP}]' python3_8)
 #              dev-python/multilint[${PYTHON_USEDEP}]
 
-distutils_enable_tests pytest
+python_test() {
+    distutils_install_for_testing
+    pytest -vv || die "Testsuite failed under ${EPYTHON}"
+}

diff --git a/dev-python/pytest-randomly/pytest-randomly-3.3.1.ebuild 
b/dev-python/pytest-randomly/pytest-randomly-3.3.1.ebuild
deleted file mode 100644
index b28fd46..0000000
--- a/dev-python/pytest-randomly/pytest-randomly-3.3.1.ebuild
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-DISTUTILS_USE_SETUPTOOLS=rdepend
-PYTHON_COMPAT=( python3_{6,7,8} )
-
-inherit distutils-r1
-
-DESCRIPTION="Pytest plugin to randomly order tests and control random.seed"
-HOMEPAGE="
-       https://pypi.python.org/pypi/pytest-randomly
-       https://github.com/pytest-dev/pytest-randomly
-"
-SRC_URI="https://github.com/pytest-dev/${PN}/archive/${PV}.tar.gz -> 
${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="test"
-RESTRICT="test"
-
-RDEPEND="
-       dev-python/docutils[${PYTHON_USEDEP}]
-       dev-python/factory_boy[${PYTHON_USEDEP}]
-       dev-python/faker[${PYTHON_USEDEP}]
-       dev-python/isort[${PYTHON_USEDEP}]
-       dev-python/numpy[${PYTHON_USEDEP}]
-       dev-python/pygments[${PYTHON_USEDEP}]
-       dev-python/secretstorage[${PYTHON_USEDEP}]
-       dev-python/twine[${PYTHON_USEDEP}]
-
-       $(python_gen_cond_dep 'dev-python/importlib_metadata[${PYTHON_USEDEP}]' 
python3_6 python3_7)
-"
-#      $(python_gen_cond_dep 'dev-python/black[${PYTHON_USEDEP}]' python3_8)
-
-#DEPEND="
-#      test? (
-#              $(python_gen_cond_dep 
'dev-python/check-manifest[${PYTHON_USEDEP}]' python3_8)
-#              dev-python/multilint[${PYTHON_USEDEP}]
-#              dev-python/pytest-xdist[${PYTHON_USEDEP}]
-#      )
-#"
-
-#no multilint for now
-#distutils_enable_tests pytest

Reply via email to