dev-python/pyopenssl: use pytest collector
authorMike Gilbert <floppym@gentoo.org>
Sun, 19 Feb 2017 17:44:28 +0000 (12:44 -0500)
committerMike Gilbert <floppym@gentoo.org>
Sun, 19 Feb 2017 17:46:20 +0000 (12:46 -0500)
Also disable test_set_default_verify_paths, which requires network
access.

Bug: https://bugs.gentoo.org/601332
Package-Manager: Portage-2.3.3_p56, Repoman-2.3.1_p49

dev-python/pyopenssl/pyopenssl-16.2.0.ebuild

index 6dba4089ccb6f005ded5ea73e2a6014101d7dd28..dd4371367c588409fdda4d3199b60f67034c808d 100644 (file)
@@ -36,13 +36,19 @@ DEPEND="${RDEPEND}
 
 S=${WORKDIR}/${MY_P}
 
+python_prepare_all() {
+       # Requires network access
+       sed -i -e 's/test_set_default_verify_paths/_&/' tests/test_ssl.py || die
+       distutils-r1_python_prepare_all
+}
+
 python_compile_all() {
        use doc && emake -C doc html
 }
 
 python_test() {
        # FIXME: for some reason, no-ops on PyPy
-       esetup.py test
+       py.test -v || die "Testing failed with ${EPYTHON}"
 }
 
 python_install_all() {