commit:     702cbfa387e022e4d8a55381e0e6a8ee2a0d47d1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 16 09:39:12 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Nov 16 10:32:07 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=702cbfa3

dev-python/hypothesis: Run more tests, fix deps

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/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 4d3e97251e3..60971e4d3a8 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() {

Reply via email to