commit: 53a44c14536cabb49b1d28a5761174798ff42ed8 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Tue Aug 17 19:24:21 2021 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Tue Aug 17 19:25:29 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53a44c14
dev-python/pytest-trio: Fix tests w/ pytest-asyncio installed Closes: https://bugs.gentoo.org/801631 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> dev-python/pytest-trio/pytest-trio-0.7.0.ebuild | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dev-python/pytest-trio/pytest-trio-0.7.0.ebuild b/dev-python/pytest-trio/pytest-trio-0.7.0.ebuild index d4e3ebf6eb2..371f976c7b9 100644 --- a/dev-python/pytest-trio/pytest-trio-0.7.0.ebuild +++ b/dev-python/pytest-trio/pytest-trio-0.7.0.ebuild @@ -41,3 +41,11 @@ python_prepare_all() { mv pytest_trio/_tests/conftest.py conftest.py || die distutils-r1_python_prepare_all } + +python_test() { + # disable autoloading pytest-asyncio in nested pytest calls + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + # since we disabled autoloading, force loading pytest-trio + local -x PYTEST_PLUGINS=pytest_trio.plugin + epytest +}
