guix-commits
[Top][All Lists]
Advanced

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

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


From: guix-commits
Subject: 03/05: gnu: python-pandas: Honor #:tests? flag.
Date: Mon, 25 Oct 2021 07:02:38 -0400 (EDT)

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

commit a0400dc9a5b5614d0d732bc07aeb7e83746c1db1
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Mon Oct 25 12:40:55 2021 +0300

    gnu: python-pandas: Honor #:tests? flag.
    
    * gnu/packages/python-science.scm (python-pandas)[arguments]: Adjust
    custom 'check phase to honor the #:tests? flag.
---
 gnu/packages/python-science.scm | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index b68a283..203e146 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -359,26 +359,27 @@ of the SGP4 satellite tracking algorithm.")
              ;; xsel needs to write a log file.
              (setenv "HOME" "/tmp")))
          (replace 'check
-           (lambda _
+           (lambda* (#:key tests? #:allow-other-keys)
              (let ((build-directory
                     (string-append
                      (getcwd) "/build/"
                      (first (scandir "build"
                                      (cut string-prefix? "lib." <>))))))
                (with-directory-excursion build-directory
-                 (invoke "pytest" "-vv" "pandas" "--skip-slow"
-                         "--skip-network"
-                         "-k"
-                         ;; These tets access the internet:
-                         ;; 
pandas/tests/io/xml/test_xml.py::test_wrong_url[lxml]
-                         ;; 
pandas/tests/io/xml/test_xml.py::test_wrong_url[etree]
-                         ;; TODO: the excel tests fail for unknown reasons
-                         (string-append "not test_wrong_url"
-                                        " and not test_excelwriter_fspath"
-                                        " and not test_ExcelWriter_dispatch"
-                                        ;; TODO: Missing input
-                                        " and not TestS3"
-                                        " and not s3")))))))))
+                 (when tests?
+                   (invoke "pytest" "-vv" "pandas" "--skip-slow"
+                           "--skip-network"
+                           "-k"
+                           ;; These tets access the internet:
+                           ;; 
pandas/tests/io/xml/test_xml.py::test_wrong_url[lxml]
+                           ;; 
pandas/tests/io/xml/test_xml.py::test_wrong_url[etree]
+                           ;; TODO: the excel tests fail for unknown reasons
+                           (string-append "not test_wrong_url"
+                                          " and not test_excelwriter_fspath"
+                                          " and not test_ExcelWriter_dispatch"
+                                          ;; TODO: Missing input
+                                          " and not TestS3"
+                                          " and not s3"))))))))))
     (propagated-inputs
      `(("python-jinja2" ,python-jinja2)
        ("python-numpy" ,python-numpy)



reply via email to

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