From f7c966ae02b4915d968b8f9769c506b1c77a17ff Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Sun, 14 Feb 2021 14:19:21 +0200
Subject: [PATCH] gnu: python-keyring: Make tests skippable.

* gnu/packages/python-crypto.scm (python-keyring)[arguments]: In custom
'check phase only run tests when tests? is #true.
---
 gnu/packages/python-crypto.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 9739de1dde..bf39f124a1 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -382,8 +382,10 @@ do what is needed for client/server Kerberos authentication based on
      `(#:phases
        (modify-phases %standard-phases
          (replace 'check
-           (lambda _
-             (invoke "pytest"))))))
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "pytest"))
+             #t)))))
     (native-inputs
      `(("python-toml" ,python-toml)
        ("python-pytest" ,python-pytest)