guix-commits
[Top][All Lists]
Advanced

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

04/06: gnu: python-trio: Honor #:tests? flag.


From: guix-commits
Subject: 04/06: gnu: python-trio: Honor #:tests? flag.
Date: Fri, 15 Oct 2021 06:45:52 -0400 (EDT)

efraim pushed a commit to branch core-updates-frozen
in repository guix.

commit dda6b8b99f69ab253f11da166ffc4d81869d6278
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Fri Oct 15 13:21:42 2021 +0300

    gnu: python-trio: Honor #:tests? flag.
    
    * gnu/packages/python-xyz.scm (python-trio)[arguments]: Honor #:tests?
    flag.
---
 gnu/packages/python-xyz.scm | 41 +++++++++++++++++++++--------------------
 1 file changed, 21 insertions(+), 20 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 62fffda..ff5b0f0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -22615,26 +22615,27 @@ project.")
              (setenv "HOME" "/tmp")
              #t))
          (replace 'check
-           (lambda _
-             (invoke "pytest" "-vv" "-k"
-                     (string-append
-                     ;; This test times out.
-                     "not test_ki_protection_works"
-                     ;; Assertion errors.
-                     " and not test_guest_mode_ki"
-                     " and not test_run_in_trio_thread_ki"
-                     " and not 
test_simple_cancel_scope_usage_doesnt_create_cyclic_garbage"
-                     " and not 
test_nursery_cancel_doesnt_create_cyclic_garbage"
-                     " and not test_locals_destroyed_promptly_on_cancel"
-                     ;; These try to raise KeyboardInterrupt which does not 
work
-                     ;; in the build environment.
-                     " and not test_ki_self"
-                     " and not test_ki_wakes_us_up"
-                     ;; Failure in name resolution.
-                     " and not test_getnameinfo"
-                     " and not test_SocketType_resolve"
-                     ;; OSError: protocol not found.
-                     " and not test_getprotobyname")))))))
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "pytest" "-vv" "-k"
+                       (string-append
+                         ;; This test times out.
+                         "not test_ki_protection_works"
+                         ;; Assertion errors.
+                         " and not test_guest_mode_ki"
+                         " and not test_run_in_trio_thread_ki"
+                         " and not 
test_simple_cancel_scope_usage_doesnt_create_cyclic_garbage"
+                         " and not 
test_nursery_cancel_doesnt_create_cyclic_garbage"
+                         " and not test_locals_destroyed_promptly_on_cancel"
+                         ;; These try to raise KeyboardInterrupt which does 
not work
+                         ;; in the build environment.
+                         " and not test_ki_self"
+                         " and not test_ki_wakes_us_up"
+                         ;; Failure in name resolution.
+                         " and not test_getnameinfo"
+                         " and not test_SocketType_resolve"
+                         ;; OSError: protocol not found.
+                         " and not test_getprotobyname"))))))))
     (native-inputs
      `(("python-astor" ,python-astor)
        ("python-ipython" ,python-ipython)



reply via email to

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