guix-commits
[Top][All Lists]
Advanced

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

01/07: gnu: python-pymediainfo: Respect "--without-tests".


From: guix-commits
Subject: 01/07: gnu: python-pymediainfo: Respect "--without-tests".
Date: Thu, 8 Jul 2021 15:23:13 -0400 (EDT)

mothacehe pushed a commit to branch master
in repository guix.

commit 3cd509bf66dc322d89dfcf8e1608b53b859206a0
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Thu Jul 8 17:07:42 2021 +0200

    gnu: python-pymediainfo: Respect "--without-tests".
    
    * gnu/packages/python-xyz.scm
      (python-pymediainfo)[arguments]<#:phases>{check}: Respect
      #:tests?.  Don't bother returning #t as it isn't required
      anymore.
    
    Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
 gnu/packages/python-xyz.scm | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index cca4d9a..5a44043 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -103,6 +103,7 @@
 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
 ;;; Copyright © 2021 jgart <jgart@dismail.de>
 ;;; Copyright © 2021 Danial Behzadi <dani.behzi@ubuntu.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -857,14 +858,14 @@ to CommonMark.")
                                "/lib/libmediainfo.so.0")))
              #t))
          (replace 'check
-           (lambda _
-             ;; Extend PYTHONPATH so the built package will be found.
-             (setenv "PYTHONPATH"
-                     (string-append (getcwd) "/build/lib:"
-                                    (getenv "PYTHONPATH")))
-             ;; Skip the only failing test "test_parse_url"
-             (invoke "pytest" "-vv" "-k" "not test_parse_url")
-             #t)))))
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               ;; Extend PYTHONPATH so the built package will be found.
+               (setenv "PYTHONPATH"
+                       (string-append (getcwd) "/build/lib:"
+                                      (getenv "PYTHONPATH")))
+               ;; Skip the only failing test "test_parse_url"
+               (invoke "pytest" "-vv" "-k" "not test_parse_url")))))))
     (home-page
      "https://github.com/sbraz/pymediainfo";)
     (synopsis



reply via email to

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