commit: f7460cb0733e242c0bc5ecef18103969144e025b
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 23 14:10:31 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jan 23 14:56:46 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7460cb0
dev-python/pytest-cov: Disable pytest plugins to speed tests up
Disable unnecessary pytest plugins as loading them in subtests causes
major slowdown.
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/pytest-cov/pytest-cov-3.0.0.ebuild | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/dev-python/pytest-cov/pytest-cov-3.0.0.ebuild
b/dev-python/pytest-cov/pytest-cov-3.0.0.ebuild
index db4782be9764..9c14153ab26d 100644
--- a/dev-python/pytest-cov/pytest-cov-3.0.0.ebuild
+++ b/dev-python/pytest-cov/pytest-cov-3.0.0.ebuild
@@ -41,7 +41,15 @@ PATCHES=(
"${FILESDIR}"/${P}-coverage-6.2.patch
)
-EPYTEST_DESELECT=(
- # attempts to install packages via pip (network)
- tests/test_pytest_cov.py::test_dist_missing_data
-)
+python_test() {
+ # NB: disabling all plugins speeds tests up a lot
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ local -x PYTEST_PLUGINS=pytest_cov.plugin,xdist.plugin,xdist.looponfail
+
+ local EPYTEST_DESELECT=(
+ # attempts to install packages via pip (network)
+ tests/test_pytest_cov.py::test_dist_missing_data
+ )
+
+ epytest
+}