summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-08-15 21:39:25 +0200
committerMarius Bakke <marius@gnu.org>2022-09-09 17:03:56 +0200
commit5f40f663f4b19ec2081def6813f499b54ea983bc (patch)
tree9ae95c792d99a2ac3847f21ab0961dc7c1dbe3e0 /gnu
parent65302a7045832dfb99d3045788344b531298a8d5 (diff)
downloadguix-5f40f663f4b19ec2081def6813f499b54ea983bc.tar.gz
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/check.scm48
1 files changed, 25 insertions, 23 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 0bce93fc79..7d131e55b5 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -984,27 +984,29 @@ standard library.")
          "0f8c31v5r2kgjixvy267n0nhc4xsy65g3n9lz1i1377z5pn5ydjg"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'build 'pretend-version
-           ;; The version string is usually derived via setuptools-scm, but
-           ;; without the git metadata available, the version string is set to
-           ;; '0.0.0'.
-           (lambda _
-             (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)))
-         (replace 'check
-           (lambda* (#:key (tests? #t) #:allow-other-keys)
-             (setenv "TERM" "dumb")     ;attempt disabling markup tests
-             (if tests?
-                 (invoke "pytest" "-vv" "-k"
-                         (string-append
-                          ;; This test involves the /usr directory, and fails.
-                          " not test_argcomplete"
-                          ;; These test do not honor the isatty detection and
-                          ;; fail.
-                          " and not test_code_highlight"
-                          " and not test_color_yes"))
-                 (format #t "test suite not run~%")))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'pretend-version
+            ;; The version string is usually derived via setuptools-scm, but
+            ;; without the git metadata available, the version string is set to
+            ;; '0.0.0'.
+            (lambda _
+              (setenv "SETUPTOOLS_SCM_PRETEND_VERSION"
+                      #$(package-version this-package))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (setenv "TERM" "dumb")    ;attempt disabling markup tests
+              (if tests?
+                  (invoke "pytest" "-vv" "-k"
+                          (string-append
+                           ;; This test involves the /usr directory, and fails.
+                           " not test_argcomplete"
+                           ;; These test do not honor the isatty detection and
+                           ;; fail.
+                           " and not test_code_highlight"
+                           " and not test_color_yes"))
+                  (format #t "test suite not run~%")))))))
     (propagated-inputs
      (list python-attrs-bootstrap
            python-iniconfig
@@ -1013,8 +1015,8 @@ standard library.")
            python-py
            python-tomli))
     (native-inputs
-     (list ;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
-           bash
+     ;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
+     (list bash
            python-hypothesis
            python-nose
            python-pytest-bootstrap