dev-python/typing: Add pypy and pypy3 to PYTHON_COMPAT
authorDavid Seifert <soap@gentoo.org>
Sat, 21 Jan 2017 01:12:37 +0000 (02:12 +0100)
committerDavid Seifert <soap@gentoo.org>
Sat, 21 Jan 2017 01:34:51 +0000 (02:34 +0100)
* Also fix test suite to actually run when
  FEATURES=test is set

Package-Manager: Portage-2.3.3, Repoman-2.3.1

dev-python/typing/typing-3.5.2.2.ebuild

index 60885d133af438ba732fdff81db0f15e7d4d13a8..1b87eadc8037ab4de2a475449e1ce9008be65f5f 100644 (file)
@@ -4,7 +4,7 @@
 
 EAPI=6
 
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy{,3} )
 
 inherit distutils-r1
 
@@ -21,5 +21,12 @@ DEPEND=""
 RDEPEND=""
 
 python_test() {
-       "${EPYTHON}" -m unittest discover || die "tests failed under ${EPYTHON}"
+       cd "${BUILD_DIR}" || die
+       if [[ ${EPYTHON} == python2* || ${EPYTHON} == pypy ]]; then
+               cp "${S}"/python2/test_typing.py . || die
+       else
+               cp "${S}"/src/test_typing.py . || die
+       fi
+
+       "${EPYTHON}" test_typing.py || die "tests failed under ${EPYTHON}"
 }