summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2021-10-15 22:52:08 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2021-10-15 22:53:44 +0300
commit61a8fec347738d27d8daf70f10439b1f2754e2e8 (patch)
tree9b136d6fc97f28e1e841fcaf81d75c78d35d8502 /dev-python/pytest-xdist
parentdev-perl/Cache-Memcached-Fast: Run tests serially (diff)
downloadgentoo-61a8fec347738d27d8daf70f10439b1f2754e2e8.tar.gz
gentoo-61a8fec347738d27d8daf70f10439b1f2754e2e8.tar.bz2
gentoo-61a8fec347738d27d8daf70f10439b1f2754e2e8.zip
dev-python/pytest-xdist: backport fix testing with xprocess
backport fix by mgorny for testing when pytest-xprocess is installed. Closes: https://bugs.gentoo.org/813093 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-python/pytest-xdist')
-rw-r--r--dev-python/pytest-xdist/pytest-xdist-2.3.0.ebuild10
1 files changed, 10 insertions, 0 deletions
diff --git a/dev-python/pytest-xdist/pytest-xdist-2.3.0.ebuild b/dev-python/pytest-xdist/pytest-xdist-2.3.0.ebuild
index c151147a967d..883e7c88dcea 100644
--- a/dev-python/pytest-xdist/pytest-xdist-2.3.0.ebuild
+++ b/dev-python/pytest-xdist/pytest-xdist-2.3.0.ebuild
@@ -35,3 +35,13 @@ PATCHES=(
)
distutils_enable_tests --install pytest
+
+python_test() {
+ # disable autoloading plugins in nested pytest calls
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ # since we disabled autoloading, force loading necessary plugins
+ local -x PYTEST_PLUGINS=xdist.plugin,xdist.looponfail,pytest_forked
+
+ distutils_install_for_testing
+ epytest
+}