diff mbox series

[bug#50018,07/19] gnu: python-cfn-lint: Respect #:tests?.

Message ID 20210811234511.32450-7-monego@posteo.net
State Accepted
Headers show
Series Update Celery to version 5. | expand

Checks

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

Commit Message

Vinicius Monego Aug. 11, 2021, 11:44 p.m. UTC
* gnu/packages/python-web.scm (python-cfn-lint)[arguments]: Make some cosmetic
changes. Respect #:tests? in the custom 'check phase.
---
 gnu/packages/python-web.scm | 36 +++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index e1da025cfb..9572bed39c 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -501,23 +501,25 @@  emit information from within their applications to the AWS X-Ray service.")
                 "1njcrwanq0py0qpz875bg05jyrs2cvpcc570xxb8rjh139n1nxsh"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (replace 'check
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      (let ((out (assoc-ref outputs "out")))
-                        ;; Remove test for the documentation update scripts
-                        ;; to avoid a dependency on 'git'.
-                        (delete-file
-                         "test/unit/module/maintenance/test_update_documentation.py")
-                        (delete-file
-                         "test/unit/module/maintenance/test_update_resource_specs.py")
-                        (setenv "PYTHONPATH"
-                                (string-append "./build/lib:"
-                                               (getenv "PYTHONPATH")))
-                        (setenv "PATH" (string-append out "/bin:"
-                                                      (getenv "PATH")))
-                        (invoke "python" "-m" "unittest" "discover"
-                                "-s" "test")))))))
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key outputs tests? #:allow-other-keys)
+             (when tests?
+               (let ((out (assoc-ref outputs "out")))
+                 ;; Remove test for the documentation update scripts
+                 ;; to avoid a dependency on 'git'.
+                 (delete-file
+                  "test/unit/module/maintenance/test_update_documentation.py")
+                 (delete-file
+                  "test/unit/module/maintenance/test_update_resource_specs.py")
+                 (setenv "PYTHONPATH"
+                         (string-append "./build/lib:"
+                                        (getenv "PYTHONPATH")))
+                 (setenv "PATH" (string-append out "/bin:"
+                                               (getenv "PATH")))
+                 (invoke "python" "-m" "unittest" "discover"
+                         "-s" "test"))))))))
     (native-inputs
      `(("python-pydot" ,python-pydot)
        ("python-mock" ,python-mock)))