From 702cbfa387e022e4d8a55381e0e6a8ee2a0d47d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 16 Nov 2019 10:39:12 +0100 Subject: [PATCH] dev-python/hypothesis: Run more tests, fix deps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- .../hypothesis/hypothesis-4.44.2.ebuild | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/dev-python/hypothesis/hypothesis-4.44.2.ebuild b/dev-python/hypothesis/hypothesis-4.44.2.ebuild index 4d3e97251e3d2..60971e4d3a839 100644 --- a/dev-python/hypothesis/hypothesis-4.44.2.ebuild +++ b/dev-python/hypothesis/hypothesis-4.44.2.ebuild @@ -18,25 +18,33 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~s IUSE="test" RESTRICT="!test? ( test )" -CDEPEND=" +RDEPEND=" >=dev-python/attrs-19.2.0[${PYTHON_USEDEP}] $(python_gen_cond_dep 'dev-python/enum34[${PYTHON_USEDEP}]' 'python2*' pypy) " -RDEPEND="${CDEPEND}" -DEPEND="${CDEPEND} +BDEPEND=" dev-python/setuptools[${PYTHON_USEDEP}] test? ( - dev-python/flaky[${PYTHON_USEDEP}] + ${RDEPEND} dev-python/mock[${PYTHON_USEDEP}] + dev-python/pexpect[${PYTHON_USEDEP}] >=dev-python/pytest-4.3[${PYTHON_USEDEP}] - dev-python/pytest-xdist[${PYTHON_USEDEP}] ) " S="${WORKDIR}/${PN}-${PN}-python-${PV}/${PN}-python" +src_prepare() { + # avoid pytest-xdist dep for one test + sed -i -e 's:test_prints_statistics_given_option_under_xdist:_&:' \ + tests/pytest/test_statistics.py || die + distutils-r1_src_prepare +} + python_test() { - py.test -v tests/cover/test_testdecorators.py || die "Tests fail with ${EPYTHON}" + local pyver=$(python_is_python3 && echo 3 || echo 2) + pytest -vv tests/cover tests/pytest tests/py${pyver} || + die "Tests fail with ${EPYTHON}" } pkg_postinst() {