1 |
commit: 762d0029d5871ece184c02bca13354d159fc35bf |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 25 11:23:02 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 25 11:23:02 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=762d0029 |
7 |
|
8 |
dev-python/hypothesis: Use pytest-xdist to speed tests up |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/hypothesis/hypothesis-5.29.0.ebuild | 13 ++++--------- |
13 |
1 file changed, 4 insertions(+), 9 deletions(-) |
14 |
|
15 |
diff --git a/dev-python/hypothesis/hypothesis-5.29.0.ebuild b/dev-python/hypothesis/hypothesis-5.29.0.ebuild |
16 |
index c80c7aa009c..89b2b4ea6b8 100644 |
17 |
--- a/dev-python/hypothesis/hypothesis-5.29.0.ebuild |
18 |
+++ b/dev-python/hypothesis/hypothesis-5.29.0.ebuild |
19 |
@@ -7,7 +7,7 @@ DISTUTILS_USE_SETUPTOOLS=rdepend |
20 |
PYTHON_COMPAT=( python3_{6,7,8,9} pypy3 ) |
21 |
PYTHON_REQ_USE="threads(+),sqlite" |
22 |
|
23 |
-inherit distutils-r1 eutils |
24 |
+inherit distutils-r1 eutils multiprocessing |
25 |
|
26 |
DESCRIPTION="A library for property based testing" |
27 |
HOMEPAGE="https://github.com/HypothesisWorks/hypothesis https://pypi.org/project/hypothesis/" |
28 |
@@ -36,17 +36,11 @@ BDEPEND=" |
29 |
dev-python/mock[${PYTHON_USEDEP}] |
30 |
dev-python/pexpect[${PYTHON_USEDEP}] |
31 |
>=dev-python/pytest-5.3.5[${PYTHON_USEDEP}] |
32 |
+ dev-python/pytest-xdist[${PYTHON_USEDEP}] |
33 |
!!<dev-python/typing-3.7.4.1 |
34 |
) |
35 |
" |
36 |
|
37 |
-src_prepare() { |
38 |
- # avoid pytest-xdist dep for one test |
39 |
- sed -i -e 's:test_prints_statistics_given_option_under_xdist:_&:' \ |
40 |
- tests/pytest/test_statistics.py || die |
41 |
- distutils-r1_src_prepare |
42 |
-} |
43 |
- |
44 |
python_prepare() { |
45 |
if ! use cli || [[ ${EPYTHON} != python3.[678] ]]; then |
46 |
sed -i -e '/console_scripts/d' setup.py || die |
47 |
@@ -54,7 +48,8 @@ python_prepare() { |
48 |
} |
49 |
|
50 |
python_test() { |
51 |
- pytest -vv tests/cover tests/pytest tests/quality || |
52 |
+ pytest -vv tests/cover tests/pytest tests/quality \ |
53 |
+ -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" || |
54 |
die "Tests fail with ${EPYTHON}" |
55 |
} |