gnu: python-pytest: Use G-expression.

* gnu/packages/check.scm (python-pytest)[arguments]: Use gexp.  While at it,
refer to THIS-PACKAGE instead of the version field.
This commit is contained in:
Marius Bakke 2022-08-15 21:39:25 +02:00
parent 65302a7045
commit 5f40f663f4
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA

View File

@ -984,27 +984,29 @@ standard library.")
"0f8c31v5r2kgjixvy267n0nhc4xsy65g3n9lz1i1377z5pn5ydjg")))) "0f8c31v5r2kgjixvy267n0nhc4xsy65g3n9lz1i1377z5pn5ydjg"))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:phases
(add-before 'build 'pretend-version #~(modify-phases %standard-phases
;; The version string is usually derived via setuptools-scm, but (add-before 'build 'pretend-version
;; without the git metadata available, the version string is set to ;; The version string is usually derived via setuptools-scm, but
;; '0.0.0'. ;; without the git metadata available, the version string is set to
(lambda _ ;; '0.0.0'.
(setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version))) (lambda _
(replace 'check (setenv "SETUPTOOLS_SCM_PRETEND_VERSION"
(lambda* (#:key (tests? #t) #:allow-other-keys) #$(package-version this-package))))
(setenv "TERM" "dumb") ;attempt disabling markup tests (replace 'check
(if tests? (lambda* (#:key tests? #:allow-other-keys)
(invoke "pytest" "-vv" "-k" (setenv "TERM" "dumb") ;attempt disabling markup tests
(string-append (if tests?
;; This test involves the /usr directory, and fails. (invoke "pytest" "-vv" "-k"
" not test_argcomplete" (string-append
;; These test do not honor the isatty detection and ;; This test involves the /usr directory, and fails.
;; fail. " not test_argcomplete"
" and not test_code_highlight" ;; These test do not honor the isatty detection and
" and not test_color_yes")) ;; fail.
(format #t "test suite not run~%"))))))) " and not test_code_highlight"
" and not test_color_yes"))
(format #t "test suite not run~%")))))))
(propagated-inputs (propagated-inputs
(list python-attrs-bootstrap (list python-attrs-bootstrap
python-iniconfig python-iniconfig
@ -1013,8 +1015,8 @@ standard library.")
python-py python-py
python-tomli)) python-tomli))
(native-inputs (native-inputs
(list ;; Tests need the "regular" bash since 'bash-final' lacks `compgen`. ;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
bash (list bash
python-hypothesis python-hypothesis
python-nose python-nose
python-pytest-bootstrap python-pytest-bootstrap