summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-01-28 21:28:29 +0100
committerMichał Górny <mgorny@gentoo.org>2022-01-28 22:50:26 +0100
commit5332ccff11d19d17c97b707856b3f1f387acfb8f (patch)
treefc591582b846d3504e0465c65b472e2bc7474595 /dev-python/pytest
parentsci-biology/augustus: add forgotten runtime dependency (diff)
downloadgentoo-5332ccff11d19d17c97b707856b3f1f387acfb8f.tar.gz
gentoo-5332ccff11d19d17c97b707856b3f1f387acfb8f.tar.bz2
gentoo-5332ccff11d19d17c97b707856b3f1f387acfb8f.zip
dev-python/pytest: Run tests in parallel (again) to save time
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pytest')
-rw-r--r--dev-python/pytest/pytest-6.2.5-r2.ebuild8
1 files changed, 5 insertions, 3 deletions
diff --git a/dev-python/pytest/pytest-6.2.5-r2.ebuild b/dev-python/pytest/pytest-6.2.5-r2.ebuild
index c3a65979f46f..51a2aecdd80a 100644
--- a/dev-python/pytest/pytest-6.2.5-r2.ebuild
+++ b/dev-python/pytest/pytest-6.2.5-r2.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{8..10} pypy3 )
-inherit distutils-r1
+inherit distutils-r1 multiprocessing
DESCRIPTION="Simple powerful testing with Python"
HOMEPAGE="https://pytest.org/"
@@ -33,6 +33,7 @@ BDEPEND="
>=dev-python/hypothesis-3.56[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
dev-python/xmlschema[${PYTHON_USEDEP}]
)"
@@ -47,6 +48,7 @@ src_test() {
python_test() {
distutils_install_for_testing --via-root
- "${EPYTHON}" -m pytest -vv --lsof -rfsxX -p no:pkgcore -p no:flaky ||
+ "${EPYTHON}" -m pytest -vv --lsof -rfsxX -p no:pkgcore -p no:flaky \
+ -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" ||
die "Tests failed with ${EPYTHON}"
}