mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-13 06:36:37 -05:00
gnu: python-pytest-django: Do not alter PYTHONPATH.
* gnu/packages/django.scm (python-django): Remove trailing #t. [phases]{check}: Do not alter PYTHONPATH.
This commit is contained in:
parent
774812df96
commit
fbf120aad8
1 changed files with 13 additions and 17 deletions
|
@ -7,6 +7,7 @@
|
||||||
;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
|
;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
|
||||||
;;; Copyright © 2019 Sam <smbaines8@gmail.com>
|
;;; Copyright © 2019 Sam <smbaines8@gmail.com>
|
||||||
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
|
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
|
||||||
|
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -309,23 +310,18 @@ (define-public python-pytest-django
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda* (#:key tests? inputs outputs #:allow-other-keys)
|
(lambda* (#:key tests? inputs outputs #:allow-other-keys)
|
||||||
(if tests?
|
(if tests?
|
||||||
(begin
|
(begin
|
||||||
(add-installed-pythonpath inputs outputs)
|
(setenv "PYTEST_DJANGO_TEST_RUNNER" "pytest")
|
||||||
(setenv "PYTHONPATH"
|
(setenv "DJANGO_SETTINGS_MODULE"
|
||||||
(string-append ".:" ;for pytest_django_test
|
"pytest_django_test.settings_sqlite_file")
|
||||||
(getenv "PYTHONPATH")))
|
(invoke "python" "-m" "pytest" "-vv" "-k"
|
||||||
(setenv "PYTEST_DJANGO_TEST_RUNNER" "pytest")
|
;; FIXME: these tests fail to locate Django templates ...
|
||||||
(setenv "DJANGO_SETTINGS_MODULE"
|
(string-append "not test_django_not_loaded_without_settings"
|
||||||
"pytest_django_test.settings_sqlite_file")
|
" and not test_settings"
|
||||||
(invoke "pytest" "-vv" "-k"
|
;; ... and this does not discover
|
||||||
;; FIXME: these tests fail to locate Django templates ...
|
;; 'pytest_django_test'.
|
||||||
(string-append "not test_django_not_loaded_without_settings"
|
" and not test_urls_cache_is_cleared")))
|
||||||
" and not test_settings"
|
(format #t "test suite not run~%")))))))
|
||||||
;; ... and this does not discover
|
|
||||||
;; 'pytest_django_test'.
|
|
||||||
" and not test_urls_cache_is_cleared")))
|
|
||||||
(format #t "test suite not run~%"))
|
|
||||||
#t)))))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("python-django" ,python-django)
|
`(("python-django" ,python-django)
|
||||||
("python-setuptools-scm" ,python-setuptools-scm)
|
("python-setuptools-scm" ,python-setuptools-scm)
|
||||||
|
|
Loading…
Reference in a new issue