gnu: python-pytest-django: Update to 3.10.0.
* gnu/packages/django.scm (python-pytest-django): Update to 3.10.0. [arguments]: Remove #:tests?. Override check phase. [native-inputs]: Add PYTHON-PYTEST-XDIST.master
parent
60c964ab75
commit
92607967c2
|
@ -309,26 +309,43 @@ size and quality.")
|
||||||
(define-public python-pytest-django
|
(define-public python-pytest-django
|
||||||
(package
|
(package
|
||||||
(name "python-pytest-django")
|
(name "python-pytest-django")
|
||||||
(version "3.1.2")
|
(version "3.10.0")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (pypi-uri "pytest-django" version))
|
(uri (pypi-uri "pytest-django" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"02932m2sr8x22m4az8syr8g835g4ak77varrnw71n6xakmdcr303"))))
|
"19nvqsb7b9kz3ikpb50m8ppf7mfhzrapdxsqd5hhd1pdfz8dprjd"))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ; FIXME: How to run tests?
|
`(#:phases
|
||||||
#:phases
|
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'patch-setuppy
|
(replace 'check
|
||||||
(lambda _
|
(lambda* (#:key tests? inputs outputs #:allow-other-keys)
|
||||||
(substitute* "setup.py"
|
(if tests?
|
||||||
(("setuptools_scm==1.11.1") "setuptools_scm"))
|
(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)))))
|
#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)
|
||||||
|
|
||||||
|
;; For tests.
|
||||||
|
("python-pytest-xdist" ,python-pytest-xdist)))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
`(("python-pytest" ,python-pytest)))
|
`(("python-pytest" ,python-pytest)))
|
||||||
(home-page "https://pytest-django.readthedocs.org/")
|
(home-page "https://pytest-django.readthedocs.org/")
|
||||||
|
|
Reference in New Issue