guix-commits
[Top][All Lists]
Advanced

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

03/03: gnu: python-gnupg: Honor #:tests? flag.


From: guix-commits
Subject: 03/03: gnu: python-gnupg: Honor #:tests? flag.
Date: Sun, 3 Oct 2021 08:26:01 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit e9d0ebe446c1076a6196b7bb125a4ba02faa10eb
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Sun Oct 3 15:21:00 2021 +0300

    gnu: python-gnupg: Honor #:tests? flag.
    
    * gnu/packages/gnupg.scm (python-gnupg)[arguments]: Adjust custom 'check
    phase to honor the #:tests? flag.
---
 gnu/packages/gnupg.scm | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 40f9ce3..8c8f491 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -583,16 +583,17 @@ decrypt messages using the OpenPGP format by making use 
of GPGME.")
      `(#:phases
        (modify-phases %standard-phases
          (replace 'check
-           (lambda _
-             (substitute* "test_gnupg.py"
-               ;; Unsure why this test fails.
-               (("'test_search_keys'") "True")
-               (("def test_search_keys") "def disabled__search_keys"))
-             (setenv "USERNAME" "guixbuilder")
-             ;; The doctests are extremely slow and sometimes time out,
-             ;; so we disable them.
-             (invoke "python"
-                     "test_gnupg.py" "--no-doctests"))))))
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (substitute* "test_gnupg.py"
+                 ;; Unsure why this test fails.
+                 (("'test_search_keys'") "True")
+                 (("def test_search_keys") "def disabled__search_keys"))
+               (setenv "USERNAME" "guixbuilder")
+               ;; The doctests are extremely slow and sometimes time out,
+               ;; so we disable them.
+               (invoke "python"
+                       "test_gnupg.py" "--no-doctests")))))))
     (native-inputs
      `(("gnupg" ,gnupg)))
     (home-page "https://pythonhosted.org/python-gnupg/index.html";)



reply via email to

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