diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index 9b5593f709..b5a5cd3045 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2018 Vijayalakshmi Vedantham ;;; Copyright © 2019 Sam -;;; Copyright © 2020 Marius Bakke +;;; Copyright © 2020, 2021 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -87,15 +87,17 @@ (define-public python-django #t)) (replace 'check - (lambda _ - (with-directory-excursion "tests" - (setenv "PYTHONPATH" - (string-append "..:" (getenv "PYTHONPATH"))) - (invoke "python" "runtests.py" - ;; By default tests run in parallel, which may cause - ;; various race conditions. Run sequentially for - ;; consistent results. - "--parallel=1"))))))) + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (with-directory-excursion "tests" + (setenv "PYTHONPATH" + (string-append "..:" (getenv "PYTHONPATH"))) + (invoke "python" "runtests.py" + ;; By default tests run in parallel, which may cause + ;; various race conditions. Run sequentially for + ;; consistent results. + "--parallel=1")) + (format #t "test suite not run~%"))))))) ;; TODO: Install extras/django_bash_completion. (native-inputs `(("tzdata" ,tzdata-for-tests)