commit:     d8708fcf676f4b8553e7639f76127417e296feca
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 25 08:05:09 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jul 25 08:31:24 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8708fcf

dev-python/virtualenv: Fix skipping tests on py2+pypy3

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

 dev-python/virtualenv/virtualenv-20.0.27.ebuild | 11 +++++++----
 dev-python/virtualenv/virtualenv-20.0.28.ebuild | 11 +++++++----
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/dev-python/virtualenv/virtualenv-20.0.27.ebuild 
b/dev-python/virtualenv/virtualenv-20.0.27.ebuild
index a8a3d84852f..65177020198 100644
--- a/dev-python/virtualenv/virtualenv-20.0.27.ebuild
+++ b/dev-python/virtualenv/virtualenv-20.0.27.ebuild
@@ -79,10 +79,13 @@ src_configure() {
 }
 
 python_test() {
-       # TODO: fix/skip with more granularity tests on pypy3
-       if has "${EPYTHON}" pypy3 python2.7; then
-               einfo "Skipping broken tests on pypy3"
-               continue
+       if ! python_is_python3; then
+               ewarn "Tests are skipped on py2, please test externally"
+               return
+       elif [[ ${EPYTHON} == pypy3 ]]; then
+               # TODO: skip with better granularity
+               ewarn "Skipping broken tests on pypy3"
+               return
        fi
 
        distutils_install_for_testing

diff --git a/dev-python/virtualenv/virtualenv-20.0.28.ebuild 
b/dev-python/virtualenv/virtualenv-20.0.28.ebuild
index a8a3d84852f..65177020198 100644
--- a/dev-python/virtualenv/virtualenv-20.0.28.ebuild
+++ b/dev-python/virtualenv/virtualenv-20.0.28.ebuild
@@ -79,10 +79,13 @@ src_configure() {
 }
 
 python_test() {
-       # TODO: fix/skip with more granularity tests on pypy3
-       if has "${EPYTHON}" pypy3 python2.7; then
-               einfo "Skipping broken tests on pypy3"
-               continue
+       if ! python_is_python3; then
+               ewarn "Tests are skipped on py2, please test externally"
+               return
+       elif [[ ${EPYTHON} == pypy3 ]]; then
+               # TODO: skip with better granularity
+               ewarn "Skipping broken tests on pypy3"
+               return
        fi
 
        distutils_install_for_testing

Reply via email to