summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-09-20 16:41:22 +0200
committerMichał Górny <mgorny@gentoo.org>2020-09-20 16:56:44 +0200
commitd9d71cc374adb1a2954bb5efddca2c096e746353 (patch)
treefcba2b05b0bf8808e76e46c632f824e10fcb1f26 /dev-python
parentnet-analyzer/nagios-core: new revision with web groups in BDEPEND. (diff)
downloadgentoo-d9d71cc374adb1a2954bb5efddca2c096e746353.tar.gz
gentoo-d9d71cc374adb1a2954bb5efddca2c096e746353.tar.bz2
gentoo-d9d71cc374adb1a2954bb5efddca2c096e746353.zip
dev-python/six: Skip tests on py2
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/six/six-1.15.0.ebuild17
1 files changed, 15 insertions, 2 deletions
diff --git a/dev-python/six/six-1.15.0.ebuild b/dev-python/six/six-1.15.0.ebuild
index 17b191fa1df6..2ad1ac731cac 100644
--- a/dev-python/six/six-1.15.0.ebuild
+++ b/dev-python/six/six-1.15.0.ebuild
@@ -14,7 +14,20 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc"
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ test? (
+ $(python_gen_cond_dep 'dev-python/pytest[${PYTHON_USEDEP}]' -3)
+ )"
distutils_enable_sphinx documentation --no-autodoc
-distutils_enable_tests pytest
+
+python_test() {
+ if ! python_is_python3; then
+ einfo "Tests are skipped on Python 2 to unblock deps"
+ return
+ fi
+ pytest -vv || die "Tests failed with ${EPYTHON}"
+}