[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
12/14: gnu: python-django: Support '--without-tests'.
From: |
guix-commits |
Subject: |
12/14: gnu: python-django: Support '--without-tests'. |
Date: |
Wed, 5 May 2021 17:49:32 -0400 (EDT) |
mbakke pushed a commit to branch master
in repository guix.
commit e35522238244961331a8f0a7059362a8ceeef6ed
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Wed May 5 21:21:03 2021 +0200
gnu: python-django: Support '--without-tests'.
* gnu/packages/django.scm (python-django)[arguments]: Test for TESTS? in the
'check' phase.
---
gnu/packages/django.scm | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 9b5593f..b5a5cd3 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -6,7 +6,7 @@
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
;;; Copyright © 2019 Sam <smbaines8@gmail.com>
-;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -87,15 +87,17 @@
#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)
- 04/14: gnu: python-bcrypt: Update to 3.2.0., (continued)
- 04/14: gnu: python-bcrypt: Update to 3.2.0., guix-commits, 2021/05/05
- 05/14: gnu: python-asgiref: Update to 3.3.4., guix-commits, 2021/05/05
- 06/14: gnu: python-netaddr: Update to 0.8.0., guix-commits, 2021/05/05
- 02/14: gnu: python-sqlparse: Update to 0.4.1., guix-commits, 2021/05/05
- 03/14: gnu: python-django-auth-ldap: Update to 2.4.0., guix-commits, 2021/05/05
- 07/14: gnu: python-cached-property: Update to 1.5.2., guix-commits, 2021/05/05
- 08/14: gnu: python-sqlparse: Remove unnecessary runtime dependencies., guix-commits, 2021/05/05
- 09/14: gnu: python-django-debug-toolbar: Update to 3.2.1., guix-commits, 2021/05/05
- 10/14: gnu: python-django-picklefield: Test with Django 2.2., guix-commits, 2021/05/05
- 11/14: gnu: python-djangorestframework: Update to 3.12.4., guix-commits, 2021/05/05
- 12/14: gnu: python-django: Support '--without-tests'.,
guix-commits <=
- 14/14: gnu: python-django: Disable django-admin wrapper., guix-commits, 2021/05/05
- 13/14: gnu: python-django: Update to 3.2.1., guix-commits, 2021/05/05