commit: 9103a16e1da48dae25563e59a213fcf0f97706b1
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 28 22:14:15 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jan 28 23:01:29 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9103a16e
dev-python/pytest-mock: Disable plugin autoloading during tests
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/pytest-mock/pytest-mock-3.7.0.ebuild | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/dev-python/pytest-mock/pytest-mock-3.7.0.ebuild
b/dev-python/pytest-mock/pytest-mock-3.7.0.ebuild
index 741a457784be..3e6c060c2c67 100644
--- a/dev-python/pytest-mock/pytest-mock-3.7.0.ebuild
+++ b/dev-python/pytest-mock/pytest-mock-3.7.0.ebuild
@@ -25,12 +25,10 @@ BDEPEND="
distutils_enable_tests pytest
-src_prepare() {
- sed -e 's/runpytest_subprocess(/&"-p","no:xprocess",/' -i
tests/test_pytest_mock.py || die
- distutils-r1_src_prepare
-}
-
python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ local -x PYTEST_PLUGINS=pytest_mock,pytest_asyncio.plugin
+
if has_version dev-python/mock; then
local EPYTEST_DESELECT=(
tests/test_pytest_mock.py::test_standalone_mock