summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorKai Knoblich <kai@FreeBSD.org>2023-12-08 10:47:14 +0100
committerKai Knoblich <kai@FreeBSD.org>2023-12-08 10:49:59 +0100
commit201f20199f7c8c76483526cd09b50176f6dc02f2 (patch)
tree58dce3e4c3d87e53d9d82656b45be2c46c7eec3a /www
parentdevel/py-maturin: Update to 1.4.0 (diff)
www/py-django-redis: Fix test suite
* When running the test suite it cannot find the "runtests.py" script as it has changed over time in newer versions. Thus, make the test suite usable again and switch to USE_PYTHON=pytest. PR: 274790 Approved by: maintainer timeout (1+ month)
Diffstat (limited to 'www')
-rw-r--r--www/py-django-redis/Makefile19
1 files changed, 13 insertions, 6 deletions
diff --git a/www/py-django-redis/Makefile b/www/py-django-redis/Makefile
index 63080c8a8c83..81957ca9dc89 100644
--- a/www/py-django-redis/Makefile
+++ b/www/py-django-redis/Makefile
@@ -13,18 +13,25 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django32>=3.2:www/py-django32@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}redis>=3.0.0:databases/py-redis@${PY_FLAVOR}
-TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hiredis>=0:databases/py-hiredis@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}mock>=0:devel/py-mock@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}msgpack>=0:devel/py-msgpack@${PY_FLAVOR}
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}msgpack>=0:devel/py-msgpack@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-django>0:devel/py-pytest-django@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-mock>0:devel/py-pytest-mock@${PY_FLAVOR} \
+ redis-server:databases/redis
USES= python
-USE_PYTHON= autoplist concurrent distutils
+USE_PYTHON= autoplist concurrent distutils pytest
+
+# Required for Python +3.11 as the 'cgi' module is deprecated and slated for
+# removal in Python 3.13
+TEST_ARGS= -W ignore::DeprecationWarning
+
+TEST_ENV= DJANGO_SETTINGS_MODULE=settings.sqlite \
+ PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}*${PORTNAME}
NO_ARCH= yes
-do-test:
- @cd ${WRKSRC}/tests && ${PYTHON_CMD} runtests.py
+TEST_WRKSRC= ${WRKSRC}/tests
.include <bsd.port.mk>