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.
parent
8d472e9314
commit
b5853e0897
|
@ -341,7 +341,14 @@ between various shells or commands.")
|
||||||
(mkdir-p bin)
|
(mkdir-p bin)
|
||||||
(substitute* "setup.py"
|
(substitute* "setup.py"
|
||||||
(("add_script\\('")
|
(("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
|
(native-inputs
|
||||||
(list python-pytest
|
(list python-pytest
|
||||||
python-mock
|
python-mock
|
||||||
|
|
Reference in New Issue