efraim pushed a commit to branch core-updates-frozen
in repository guix.
commit d76e0a36f93b41bac2d42b85fa80079784cd0b76
Author: Efraim Flashner <[email protected]>
AuthorDate: Wed Oct 27 11:01:41 2021 +0300
gnu: python-pytest-toolbox: Honor #:tests? flag.
* gnu/packages/python-check.scm (python-pytest-toolbox)[arguments]:
Adjust custom 'check phase to honor the #:tests? flag.
---
gnu/packages/python-check.scm | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 7c2920f..9ae697d 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -1129,12 +1129,13 @@ service processes for your tests with pytest.")
'(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (substitute* "setup.cfg"
- ((".*timeout.*") ""))
- ;; Make the installed plugin discoverable by Pytest.
- (add-installed-pythonpath inputs outputs)
- (invoke "pytest" "-vv"))))))
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (substitute* "setup.cfg"
+ ((".*timeout.*") ""))
+ ;; Make the installed plugin discoverable by Pytest.
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "-vv")))))))
(native-inputs
`(("python-pydantic" ,python-pydantic)
("python-pytest" ,python-pytest)