From 204aa5666bb52c227f38c6329bc0dbd48de45dc7 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sat, 21 Apr 2018 09:49:24 +0200 Subject: dev-python/django-tastypie: Enable tests Enable running tests. Correct test dependencies. Replace the silly test->bip REQUIRED_USE constraint with explicit test dependency on dev-python/biplist. Add a blocker on sci-libs/geos. --- .../django-tastypie/django-tastypie-0.13.3.ebuild | 40 ++++++++++++++++++---- 1 file changed, 34 insertions(+), 6 deletions(-) (limited to 'dev-python/django-tastypie') diff --git a/dev-python/django-tastypie/django-tastypie-0.13.3.ebuild b/dev-python/django-tastypie/django-tastypie-0.13.3.ebuild index eacdb8aacc92..4ffc18c6c946 100644 --- a/dev-python/django-tastypie/django-tastypie-0.13.3.ebuild +++ b/dev-python/django-tastypie/django-tastypie-0.13.3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=5 @@ -26,27 +26,55 @@ COMMON_DEPEND=">=dev-python/mimeparse-0.1.4[${PYTHON_USEDEP}] RDEPEND="${COMMON_DEPEND} bip? ( dev-python/biplist[${PYTHON_USEDEP}] )" -#dev-python/pyyaml is pulled in with django itself +# test: django fails at current version of sci-libs/geos, making tests +# explode immediately DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] test? ( ${COMMON_DEPEND} + dev-python/biplist[${PYTHON_USEDEP}] dev-python/lxml[${PYTHON_USEDEP}] - dev-python/coverage[${PYTHON_USEDEP}] dev-python/pyyaml[${PYTHON_USEDEP}] dev-python/defusedxml[${PYTHON_USEDEP}] $(python_gen_cond_dep '>=dev-python/mock-1.1.0[${PYTHON_USEDEP}]' python2_7) - >=dev-python/pytz-2013b[${PYTHON_USEDEP}] ) + >=dev-python/pytz-2013b[${PYTHON_USEDEP}] + !!sci-libs/geos[python] ) doc? ( dev-python/sphinx[${PYTHON_USEDEP}] >=dev-python/django-1.9[${PYTHON_USEDEP}] =dev-python/mock-1.1.0[${PYTHON_USEDEP}]' python2_7) dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}] )" -REQUIRED_USE="test? ( bip )" - python_compile_all() { use doc && emake -C docs html } +python_test() { + cd tests || die + # keep in sync with tox.ini + django-admin.py test -v 2 -p '*' core.tests --settings=settings_core || + die "core.tests fail with ${EPYTHON}" + django-admin.py test -v 2 basic.tests --settings=settings_basic || + die "basic.tests fail with ${EPYTHON}" + django-admin.py test -v 2 related_resource.tests --settings=settings_related || + die "related_resource.tests fail with ${EPYTHON}" + django-admin.py test -v 2 alphanumeric.tests --settings=settings_alphanumeric || + die "alphanumeric.tests fail with ${EPYTHON}" + django-admin.py test -v 2 authorization.tests --settings=settings_authorization || + die "authorization.tests fail with ${EPYTHON}" + django-admin.py test -v 2 content_gfk.tests --settings=settings_content_gfk || + die "content_gfk.tests fail with ${EPYTHON}" + django-admin.py test -v 2 customuser.tests --settings=settings_customuser || + die "customuser.tests fail with ${EPYTHON}" + django-admin.py test -v 2 namespaced.tests --settings=settings_namespaced || + die "namespaced.tests fail with ${EPYTHON}" + django-admin.py test -v 2 slashless.tests --settings=settings_slashless || + die "slashless.tests fail with ${EPYTHON}" + django-admin.py test -v 2 validation.tests --settings=settings_validation || + die "validation.tests fail with ${EPYTHON}" +# requires dev-python/geos but django fails at the current version of it +# django-admin.py test -v 2 gis.tests --settings=settings_gis_spatialite || +# die "gis.tests fail with ${EPYTHON}" +} + python_install_all() { use doc && local HTML_DOCS=( docs/_build/html/. ) distutils-r1_python_install_all -- cgit v1.2.3-65-gdbad