summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-06-23 23:13:21 +0200
committerMichał Górny <mgorny@gentoo.org>2020-06-23 23:13:21 +0200
commit372315986c5a9bfd14a6088964df7056d8d159e2 (patch)
tree8ddeff334ca51134ff87db196d60fe8526ea9cb5 /dev-python/flask-gravatar
parentdev-python/flask-gravatar: Remove dep on pytest-runner (diff)
downloadgentoo-372315986c5a9bfd14a6088964df7056d8d159e2.tar.gz
gentoo-372315986c5a9bfd14a6088964df7056d8d159e2.tar.bz2
gentoo-372315986c5a9bfd14a6088964df7056d8d159e2.zip
dev-python/flask-gravatar: Enable tests
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/flask-gravatar')
-rw-r--r--dev-python/flask-gravatar/flask-gravatar-0.5.0.ebuild10
1 files changed, 10 insertions, 0 deletions
diff --git a/dev-python/flask-gravatar/flask-gravatar-0.5.0.ebuild b/dev-python/flask-gravatar/flask-gravatar-0.5.0.ebuild
index 01350e36cdcc..0a62779f0ae5 100644
--- a/dev-python/flask-gravatar/flask-gravatar-0.5.0.ebuild
+++ b/dev-python/flask-gravatar/flask-gravatar-0.5.0.ebuild
@@ -20,7 +20,17 @@ KEYWORDS="amd64 x86"
RDEPEND="dev-python/flask[${PYTHON_USEDEP}]"
+distutils_enable_tests pytest
+
src_prepare() {
sed -i -e '/pytest-runner/d' setup.py || die
+ sed -e 's:--pep8::' \
+ -e 's:--cov=flask_gravatar --cov-report=term-missing::' \
+ -i pytest.ini || die
distutils-r1_src_prepare
}
+
+python_test() {
+ cd tests || die
+ pytest -vv || die "Tests failed with ${EPYTHON}"
+}