dev-python/embedly: Add test running code
authorMichał Górny <mgorny@gentoo.org>
Wed, 17 May 2017 19:37:49 +0000 (21:37 +0200)
committerMichał Górny <mgorny@gentoo.org>
Wed, 17 May 2017 20:51:11 +0000 (22:51 +0200)
dev-python/embedly/embedly-0.5.0-r1.ebuild

index e26065a3f3539af0deff9c30a6f56e6f5dcf4fdf..23a3bd163bbae3d16b47a5caa83f066ad217722d 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -16,9 +16,17 @@ SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
 LICENSE="BSD"
 SLOT="0"
 KEYWORDS="amd64 x86"
+IUSE="test"
 
 RDEPEND="dev-python/httplib2[${PYTHON_USEDEP}]"
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+       test? ( $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' -2) )"
 
 S="${WORKDIR}/${MY_P}"
+
 # Testsuite relies upon connection to various sites on the net
+RESTRICT="test"
+
+python_test() {
+       esetup.py test
+}