summaryrefslogtreecommitdiff
path: root/dev-python/pytest-testinfra/pytest-testinfra-7.0.0.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pytest-testinfra/pytest-testinfra-7.0.0.ebuild')
-rw-r--r--dev-python/pytest-testinfra/pytest-testinfra-7.0.0.ebuild19
1 files changed, 17 insertions, 2 deletions
diff --git a/dev-python/pytest-testinfra/pytest-testinfra-7.0.0.ebuild b/dev-python/pytest-testinfra/pytest-testinfra-7.0.0.ebuild
index 8969cefa4304..6e95a5f30b3f 100644
--- a/dev-python/pytest-testinfra/pytest-testinfra-7.0.0.ebuild
+++ b/dev-python/pytest-testinfra/pytest-testinfra-7.0.0.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_10 )
+PYTHON_COMPAT=( python3_{10..11} )
inherit distutils-r1
@@ -30,7 +30,9 @@ BDEPEND="
dev-python/setuptools_scm[${PYTHON_USEDEP}]
test? (
app-admin/ansible
- app-admin/salt[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '
+ app-admin/salt[${PYTHON_USEDEP}]
+ ' python3_10)
dev-python/paramiko[${PYTHON_USEDEP}]
dev-python/pywinrm[${PYTHON_USEDEP}]
sys-apps/which
@@ -39,6 +41,19 @@ BDEPEND="
distutils_enable_tests pytest
+python_test() {
+ local -x EPYTEST_IGNORE=()
+
+ # This is the only test which actually fails if salt cannot be imported
+ if [[ ${EPYTHON} == python3.11 ]]; then
+ EPYTEST_IGNORE+=(
+ test/test_backends.py::test_backend_importables
+ )
+ fi
+
+ epytest
+}
+
pkg_postinst() {
elog "For the list of available connection back-ends and their dependencies,"
elog "please consult https://testinfra.readthedocs.io/en/latest/backends.html"