commit:     d407796fb54195a8b8568cc4c76d6f2d3f8ac9f9
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon May  9 15:10:07 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon May  9 20:34:00 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d407796f

dev-python/pytest: Enable py3.11

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pytest/pytest-7.1.2.ebuild | 25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/dev-python/pytest/pytest-7.1.2.ebuild 
b/dev-python/pytest/pytest-7.1.2.ebuild
index edb8937ece04..1143038d9a5b 100644
--- a/dev-python/pytest/pytest-7.1.2.ebuild
+++ b/dev-python/pytest/pytest-7.1.2.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
 
 inherit distutils-r1 multiprocessing
 
@@ -35,14 +35,16 @@ BDEPEND="
        >=dev-python/setuptools_scm-6.2.3[${PYTHON_USEDEP}]
        test? (
                ${RDEPEND}
-               dev-python/argcomplete[${PYTHON_USEDEP}]
-               >=dev-python/hypothesis-3.56[${PYTHON_USEDEP}]
-               dev-python/mock[${PYTHON_USEDEP}]
-               dev-python/nose[${PYTHON_USEDEP}]
-               >=dev-python/pygments-2.7.2[${PYTHON_USEDEP}]
-               dev-python/pytest-xdist[${PYTHON_USEDEP}]
-               dev-python/requests[${PYTHON_USEDEP}]
-               dev-python/xmlschema[${PYTHON_USEDEP}]
+               $(python_gen_cond_dep '
+                       dev-python/argcomplete[${PYTHON_USEDEP}]
+                       >=dev-python/hypothesis-3.56[${PYTHON_USEDEP}]
+                       dev-python/mock[${PYTHON_USEDEP}]
+                       dev-python/nose[${PYTHON_USEDEP}]
+                       >=dev-python/pygments-2.7.2[${PYTHON_USEDEP}]
+                       dev-python/pytest-xdist[${PYTHON_USEDEP}]
+                       dev-python/requests[${PYTHON_USEDEP}]
+                       dev-python/xmlschema[${PYTHON_USEDEP}]
+               ' python3_{8..10} pypy3)
        )
 "
 
@@ -54,6 +56,11 @@ src_test() {
 }
 
 python_test() {
+       if ! has "${EPYTHON}" python3.{8..10} pypy3; then
+               einfo "Skipping tests on ${EPYTHON}"
+               return
+       fi
+
        local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
        local -x COLUMNS=80
 

Reply via email to