From 85fb1c6f1dd62f0b7b33d3c7e0f8547b9634979e Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Fri, 17 Jan 2025 15:53:34 +0000 Subject: [PATCH] gnu: python-django-haystack: Enable tests. * gnu/packages/django.scm (python-django-haystack): Use G-Expressions. [arguments] : Use custom 'check. Remove 'set-gdal-lib-path having it makes all tests to fail. [inputs]: Remove gdal. Change-Id: Ic7b70f731cd805b2aedfc94fe9a13cb37c7ff930 --- gnu/packages/django.scm | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index eaa6b7eee9872ff9367941b602dc3f0344892545..7f481f785ab122dc83d00fc0c007e1a26e971829 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -497,21 +497,17 @@ useful tools for testing Django applications and projects.") (build-system pyproject-build-system) (arguments (list - ;; It is unclear how to run the tests. They require a running local - ;; solr server. - #:tests? #false #:phases - '(modify-phases %standard-phases - (add-before 'check 'set-gdal-lib-path - (lambda* (#:key inputs #:allow-other-keys) - (setenv "GDAL_LIBRARY_PATH" - (string-append (assoc-ref inputs "gdal") - "/lib")))) + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python" "test_haystack/run_tests.py")))) ;; Importing this module requires setting up a Django project. (delete 'sanity-check)))) (propagated-inputs (list python-django python-packaging)) - (inputs (list gdal)) + ;; (inputs (list gdal)) ; it's optional, tests fail when provided (native-inputs (list python-coverage python-dateutil