summaryrefslogtreecommitdiff
path: root/gnu/packages/django.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-01-23 00:22:44 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-02-01 11:53:49 -0500
commitfbf120aad801984ee3a432b861add7951335a323 (patch)
tree26b24c014cbfb1cb528583008ed9c60f5bce1ecf /gnu/packages/django.scm
parent774812df96d2c21dba52e0360927cd78ae97a959 (diff)
downloadguix-patches-fbf120aad801984ee3a432b861add7951335a323.tar
guix-patches-fbf120aad801984ee3a432b861add7951335a323.tar.gz
gnu: python-pytest-django: Do not alter PYTHONPATH.
* gnu/packages/django.scm (python-django): Remove trailing #t. [phases]{check}: Do not alter PYTHONPATH.
Diffstat (limited to 'gnu/packages/django.scm')
-rw-r--r--gnu/packages/django.scm30
1 files changed, 13 insertions, 17 deletions
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 091d7571d7..66f4362890 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
;;; Copyright © 2019 Sam <smbaines8@gmail.com>
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -309,23 +310,18 @@ size and quality.")
(replace 'check
(lambda* (#:key tests? inputs outputs #:allow-other-keys)
(if tests?
- (begin
- (add-installed-pythonpath inputs outputs)
- (setenv "PYTHONPATH"
- (string-append ".:" ;for pytest_django_test
- (getenv "PYTHONPATH")))
- (setenv "PYTEST_DJANGO_TEST_RUNNER" "pytest")
- (setenv "DJANGO_SETTINGS_MODULE"
- "pytest_django_test.settings_sqlite_file")
- (invoke "pytest" "-vv" "-k"
- ;; FIXME: these tests fail to locate Django templates ...
- (string-append "not test_django_not_loaded_without_settings"
- " and not test_settings"
- ;; ... and this does not discover
- ;; 'pytest_django_test'.
- " and not test_urls_cache_is_cleared")))
- (format #t "test suite not run~%"))
- #t)))))
+ (begin
+ (setenv "PYTEST_DJANGO_TEST_RUNNER" "pytest")
+ (setenv "DJANGO_SETTINGS_MODULE"
+ "pytest_django_test.settings_sqlite_file")
+ (invoke "python" "-m" "pytest" "-vv" "-k"
+ ;; FIXME: these tests fail to locate Django templates ...
+ (string-append "not test_django_not_loaded_without_settings"
+ " and not test_settings"
+ ;; ... and this does not discover
+ ;; 'pytest_django_test'.
+ " and not test_urls_cache_is_cleared")))
+ (format #t "test suite not run~%")))))))
(native-inputs
`(("python-django" ,python-django)
("python-setuptools-scm" ,python-setuptools-scm)