guix-commits
[Top][All Lists]
Advanced

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

10/15: gnu: python-cfn-lint: Honor #:tests? flag.


From: guix-commits
Subject: 10/15: gnu: python-cfn-lint: Honor #:tests? flag.
Date: Sat, 11 Dec 2021 18:29:31 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit dbf5d938c54dbc0cf3271018a0a4aa5b69ec4037
Author: Vinicius Monego <monego@posteo.net>
AuthorDate: Fri Nov 5 01:58:31 2021 +0000

    gnu: python-cfn-lint: Honor #:tests? flag.
    
    * gnu/packages/python-web.scm (python-cfn-lint)[arguments]: Make some 
cosmetic
    changes. Adjust custom 'check phase to honor the #:tests? flag.
    
    Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
 gnu/packages/python-web.scm | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index f47ba86..063b2c5 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -514,23 +514,23 @@ emit information from within their applications to the 
AWS X-Ray service.")
                 "106qf19n2k6sdjkb4006aidibd24qqiw901c1613xgjpnyw4dyl6"))))
     (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" "-v"
-                                "-s" "test")))))))
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key inputs 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")
+                 (add-installed-pythonpath inputs outputs)
+                 (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)))



reply via email to

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