[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: gnu: trash-cli: Use pytest for testing.
From: |
guix-commits |
Subject: |
01/02: gnu: trash-cli: Use pytest for testing. |
Date: |
Tue, 15 Feb 2022 04:39:06 -0500 (EST) |
lbraun pushed a commit to branch master
in repository guix.
commit b5853e08979bcbecbf43f320bb99564a4a656160
Author: Lars-Dominik Braun <lars@6xq.net>
AuthorDate: Tue Feb 15 10:31:24 2022 +0100
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.
---
gnu/packages/shellutils.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
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