guix-patches
[Top][All Lists]
Advanced

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

[bug#50018] [PATCH v3 11/21] gnu: python-moto: Respect #:tests?.


From: Vinicius Monego
Subject: [bug#50018] [PATCH v3 11/21] gnu: python-moto: Respect #:tests?.
Date: Thu, 16 Sep 2021 16:21:02 +0000

* gnu/packages/python-xyz.scm (python-moto)[source]: Make some cosmetic
changes.
[arguments]: Respect #:tests? in the custom 'check phase.
---
 gnu/packages/python-xyz.scm | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b2be163eec..9f8df19a66 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12673,21 +12673,22 @@ text.")
                (("#!/bin/bash")
                 (string-append "#!" (which "bash"))))))
          (replace 'check
-           (lambda _
-             (setenv "PYTHONPATH" (string-append "./build/lib:"
-                                                 (getenv "PYTHONPATH")))
-             (invoke "pytest" "-vv" "-m" "not network" "-k"
-                     (string-append
-                      ;; These tests require Docker.
-                      "not test_terminate_job"
-                      " and not test_invoke_function_from_sqs_exception"
-                      " and not test_rotate_secret_lambda_invocations"
-                      ;; ConnectionAborted errors.
-                      " and not test_put_record_batch_http_destination"
-                      " and not test_put_record_http_destination"
-                      " and not test_dependencies"
-                      " and not test_cancel_running_job"
-                      " and not test_container_overrides")))))))
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (setenv "PYTHONPATH" (string-append "./build/lib:"
+                                                   (getenv "PYTHONPATH")))
+               (invoke "pytest" "-vv" "-m" "not network" "-k"
+                       (string-append
+                        ;; These tests require Docker.
+                        "not test_terminate_job"
+                        " and not test_invoke_function_from_sqs_exception"
+                        " and not test_rotate_secret_lambda_invocations"
+                        ;; ConnectionAborted errors.
+                        " and not test_put_record_batch_http_destination"
+                        " and not test_put_record_http_destination"
+                        " and not test_dependencies"
+                        " and not test_cancel_running_job"
+                        " and not test_container_overrides"))))))))
     (native-inputs
      `(("python-flask" ,python-flask)
        ("python-flask-cors" ,python-flask-cors)
-- 
2.30.2






reply via email to

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