diff mbox series

[bug#48263,v2,3/3] gnu: hypercorn: Honor #:tests? in 'check' phase.

Message ID 20211030173048.53815-3-monego@posteo.net
State Accepted
Headers show
Series [bug#48263,v2,1/3] gnu: python-hypercorn: Remove "python-" prefix from name. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Vinicius Monego Oct. 30, 2021, 5:30 p.m. UTC
* gnu/packages/python-web.scm (hypercorn)[arguments]: Honor #:tests? in
'check' phase.
---
 gnu/packages/python-web.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 287574301d..204059a08a 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -1630,9 +1630,10 @@  RFC6455, regardless of your programming paradigm.")
      `(#:phases
        (modify-phases %standard-phases
          (replace 'check
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (add-installed-pythonpath inputs outputs)
-             (invoke "pytest" "-vv"))))))
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "python" "-m" "pytest")))))))
     ;; Propagate because Hypercorn also exposes functionality over a module.
     (propagated-inputs
      `(("python-h11" ,python-h11)