commit:     6405e6f39879e819719f5f0950b4c8c164496d70
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 22 17:01:28 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Dec 22 17:04:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6405e6f3

dev-python/jinja2: Disable trio tests when it is not installed

Closes: https://bugs.gentoo.org/946830
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/jinja2/jinja2-3.1.5.ebuild | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/dev-python/jinja2/jinja2-3.1.5.ebuild 
b/dev-python/jinja2/jinja2-3.1.5.ebuild
index 256a32846e84..c194a64b9b22 100644
--- a/dev-python/jinja2/jinja2-3.1.5.ebuild
+++ b/dev-python/jinja2/jinja2-3.1.5.ebuild
@@ -39,6 +39,19 @@ src_prepare() {
        distutils-r1_src_prepare
 }
 
+python_test() {
+       local EPYTEST_IGNORE=()
+       if ! has_version "dev-python/trio[${PYTHON_USEDEP}]"; then
+               EPYTEST_IGNORE+=(
+                       tests/test_async.py
+                       tests/test_async_filters.py
+               )
+       fi
+
+       local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+       epytest
+}
+
 pkg_postinst() {
        if ! has_version dev-python/babel; then
                elog "For i18n support, please emerge dev-python/babel."

Reply via email to