summary refs log tree commit diff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-10-03 15:21:00 +0300
committerEfraim Flashner <efraim@flashner.co.il>2021-10-03 15:21:00 +0300
commite9d0ebe446c1076a6196b7bb125a4ba02faa10eb (patch)
tree40ee3552fc76da38366385f6e8b7a6275a595c1c
parent69c7dd8090cdbf1966fff0bab8ff298f91c7a6e0 (diff)
downloadguix-e9d0ebe446c1076a6196b7bb125a4ba02faa10eb.tar.gz
gnu: python-gnupg: Honor #:tests? flag.
* gnu/packages/gnupg.scm (python-gnupg)[arguments]: Adjust custom 'check
phase to honor the #:tests? flag.
-rw-r--r--gnu/packages/gnupg.scm21
1 files changed, 11 insertions, 10 deletions
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 40f9ce3d81..8c8f491a18 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")