From be0208ec654fa3530ae5a848feaf10fe33125c39 Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Sun, 29 Mar 2020 14:35:39 +0200 Subject: [PATCH] dev-python/pytest-trio: made some progress with the tests Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Andrew Ammerlaan --- .../pytest-trio/pytest-trio-0.5.2.ebuild | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/dev-python/pytest-trio/pytest-trio-0.5.2.ebuild b/dev-python/pytest-trio/pytest-trio-0.5.2.ebuild index b35afa2685..8232fa52c8 100644 --- a/dev-python/pytest-trio/pytest-trio-0.5.2.ebuild +++ b/dev-python/pytest-trio/pytest-trio-0.5.2.ebuild @@ -3,7 +3,9 @@ EAPI="7" -PYTHON_COMPAT=( python3_6 ) +PYTHON_COMPAT=( python3_{6,7} ) + +DISTUTILS_USE_SETUPTOOLS=rdepend inherit distutils-r1 @@ -18,6 +20,9 @@ LICENSE="|| ( MIT Apache-2.0 )" SLOT="0" KEYWORDS="~amd64 ~x86" +# lots of different errors +RESTRICT="test" + RDEPEND=" >=dev-python/async_generator-1.9[${PYTHON_USEDEP}] dev-python/outcome[${PYTHON_USEDEP}] @@ -35,3 +40,17 @@ DEPEND=" distutils_enable_tests pytest distutils_enable_sphinx docs/source + +python_prepare_all() { + # AttributeError("module 'pytest' has no attribute 'RemovedInPytest4Warning'",) + rm pytest_trio/_tests/conftest.py || die + + distutils-r1_python_prepare_all +} + +python_test() { + # has to be run in source dir + PYTHONPATH="${S}" + cd "${S}" || die + pytest -vv || die "Tests fail with ${EPYTHON}" +}