guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Vinicius Monego
Subject: [bug#50018] [PATCH 07/19] gnu: python-cfn-lint: Respect #:tests?.
Date: Wed, 11 Aug 2021 23:44:59 +0000

* 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 --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)))
-- 
2.30.2






reply via email to

[Prev in Thread] Current Thread [Next in Thread]