diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-01-23 15:10:31 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-01-23 15:56:46 +0100 |
commit | f7460cb0733e242c0bc5ecef18103969144e025b (patch) | |
tree | e7624ecc3cdba7ec39a239218680a8c223dffacb /dev-python/pytest-cov | |
parent | dev-python/pytest-cov: Backport test fix for coverage-6.2 (diff) | |
download | gentoo-f7460cb0733e242c0bc5ecef18103969144e025b.tar.gz gentoo-f7460cb0733e242c0bc5ecef18103969144e025b.tar.bz2 gentoo-f7460cb0733e242c0bc5ecef18103969144e025b.zip |
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@gentoo.org>
Diffstat (limited to 'dev-python/pytest-cov')
-rw-r--r-- | dev-python/pytest-cov/pytest-cov-3.0.0.ebuild | 16 |
1 files 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 +} |