summary refs log tree commit diff
path: root/gnu/packages/shellutils.scm
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2022-02-15 10:31:24 +0100
committerLars-Dominik Braun <lars@6xq.net>2022-02-15 10:38:36 +0100
commitb5853e08979bcbecbf43f320bb99564a4a656160 (patch)
tree99ce39b5ff888983f900032ece760f15ba231bd0 /gnu/packages/shellutils.scm
parent8d472e9314052403ad548f92ca6c10f9c961a087 (diff)
downloadguix-b5853e08979bcbecbf43f320bb99564a4a656160.tar.gz
gnu: trash-cli: Use pytest for testing.
Running setup.py overwrites the wrappers created by the 'wrap phase.

Fixes: <https://issues.guix.gnu.org/53695>

* gnu/packages/shellutils.scm (trash-cli)[arguments]: Replace 'check
phase with call to pytest.
Diffstat (limited to 'gnu/packages/shellutils.scm')
-rw-r--r--gnu/packages/shellutils.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index 3f9f8a27f4..d0f4068062 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -341,7 +341,14 @@ between various shells or commands.")
                (mkdir-p bin)
                (substitute* "setup.py"
                  (("add_script\\('")
-                  (string-append "add_script('" bin "/" )))))))))
+                  (string-append "add_script('" bin "/" ))))))
+         ;; Whenever setup.py is invoked, scripts in out/bin/ are
+         ;; replaced. Thus we cannot invoke setup.py for testing.
+         ;; Upstream also uses pytest.
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "pytest")))))))
     (native-inputs
      (list python-pytest
            python-mock