From db182798e725005bbfbfc737e7aa5df465bd64b0 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 8 Dec 2025 01:10:26 +0100 Subject: [PATCH] python3Packages.django-rq: enable tests --- .../python-modules/django-rq/default.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/django-rq/default.nix b/pkgs/development/python-modules/django-rq/default.nix index e2cde4193c0c..e0ceb3a42fb4 100644 --- a/pkgs/development/python-modules/django-rq/default.nix +++ b/pkgs/development/python-modules/django-rq/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, hatchling, @@ -8,9 +9,9 @@ rq, prometheus-client, sentry-sdk, - psycopg, pytest-django, pytestCheckHook, + pyyaml, redisTestHook, }: @@ -41,7 +42,20 @@ buildPythonPackage rec { pythonImportsCheck = [ "django_rq" ]; - doCheck = false; # require redis-server + # redis hook does not support darwin + doCheck = !stdenv.hostPlatform.isDarwin; + + nativeCheckInputs = [ + pytest-django + pytestCheckHook + pyyaml + redisTestHook + ] + ++ lib.concatAttrValues optional-dependencies; + + preCheck = '' + export DJANGO_SETTINGS_MODULE=tests.settings + ''; meta = with lib; { description = "Simple app that provides django integration for RQ (Redis Queue)";