dev-python/flake8-polyfill: Enable tests
authorMichał Górny <mgorny@gentoo.org>
Wed, 26 Apr 2017 15:39:57 +0000 (17:39 +0200)
committerMichał Górny <mgorny@gentoo.org>
Wed, 26 Apr 2017 16:33:58 +0000 (18:33 +0200)
dev-python/flake8-polyfill/flake8-polyfill-1.0.1.ebuild

index eb46a256ccff79e2aa0410e8de8722f804f6d14f..84bd5353b4fbaa670f9302fb30f63f08f0adb68a 100644 (file)
@@ -14,7 +14,15 @@ EGIT_REPO_URI="https://gitlab.com/pycqa/flake8-polyfill.git"
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE=""
+IUSE="test"
 
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
 RDEPEND="dev-python/flake8[${PYTHON_USEDEP}]"
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+       test? ( ${RDEPEND}
+               dev-python/mock[${PYTHON_USEDEP}]
+               dev-python/pytest[${PYTHON_USEDEP}]
+       )"
+
+python_test() {
+       py.test -v || die "Tests fail with ${EPYTHON}"
+}