diff mbox series

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

Message ID 20210916162112.54462-12-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/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Vinicius Monego Sept. 16, 2021, 4:21 p.m. UTC
* 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 mbox series

Patch

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)