dev-python/tweepy: Fix tests
authorJustin Lecher <jlec@gentoo.org>
Sun, 17 Jan 2016 17:50:53 +0000 (18:50 +0100)
committerJustin Lecher <jlec@gentoo.org>
Sun, 17 Jan 2016 19:43:34 +0000 (20:43 +0100)
Package-Manager: portage-2.2.26
Signed-off-by: Justin Lecher <jlec@gentoo.org>
dev-python/tweepy/tweepy-2.3.ebuild
dev-python/tweepy/tweepy-3.3.0.ebuild

index 198729335bd281069f36a6e6d8b9d91162170673..6e0482ea65009e936c1e0522754f42ce70ef83b1 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -17,9 +17,15 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE="doc examples test"
 
-#RESTRICT="test"       #missing a required dep frpm portage
+# online tests
+RESTRICT="test"
 
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+DEPEND="
+       dev-python/setuptools[${PYTHON_USEDEP}]
+       test? (
+               dev-python/httreplay[${PYTHON_USEDEP}]
+               dev-python/nose[${PYTHON_USEDEP}]
+       )"
 
 python_prepare_all() {
        # Required to avoid file collisions at install
@@ -30,7 +36,9 @@ python_prepare_all() {
 }
 
 python_test() {
-       "${PYTHON}" -m tests || die "Tests failed"
+       nosetests -v \
+               tests.test_api tests.test_streaming \
+               tests.test_cursors tests.test_utils || die
 }
 
 python_compile_all() {
index 16cbb91c967a4f154d613b94359f150fe9d38179..263fad6e34b6c19a26516708c9ac5fe1fb3e1023 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -22,6 +22,7 @@ RESTRICT="test"       #missing in tarball
 DEPEND="
        dev-python/pip[${PYTHON_USEDEP}]
        dev-python/setuptools[${PYTHON_USEDEP}]
+       test? ( dev-python/nose[${PYTHON_USEDEP}] )
        "
 RDEPEND="
        >=dev-python/requests-2.4.3[${PYTHON_USEDEP}]
@@ -37,7 +38,7 @@ python_prepare_all() {
 }
 
 python_test() {
-       "${PYTHON}" -m tests || die "Tests failed"
+       nosetests -v  -c tests/travis-tests.cfg || die
 }
 
 python_compile_all() {