GNU bug report logs - #69924
[PATCH 00/49] gnu: Astronomy 2024/02 updates.

Previous Next

Package: guix-patches;

Reported by: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Date: Wed, 20 Mar 2024 22:26:01 UTC

Severity: normal

Tags: patch

Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #89 received at 69924 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 69924 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 28/49] gnu: python-astroquery: Update to 0.4.7.
Date: Wed, 20 Mar 2024 22:27:58 +0000
* gnu/packages/astronomy.scm (python-astroquery): Update to 0.4.7.
[arguments] <#:test-flags>: Disable one failing test.
<#:phases>: Remove 'prepare-test-environment phase. Add custom 'check
phase.

Change-Id: I159a9d765de7f8de00c4bf226febfc90d2ba6c76
---
 gnu/packages/astronomy.scm | 35 +++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index b3ce51c8df..efd70f5500 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -1739,34 +1739,37 @@ (define-public python-astropy-iers-data
 (define-public python-astroquery
   (package
     (name "python-astroquery")
-    (version "0.4.6")
+    (version "0.4.7")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "astroquery" version))
        (sha256
-        (base32 "1vhkzsqlgn3ji5by2rdf2gwklhbyzvpzb1iglalhqjkkrdaaaz1h"))))
+        (base32 "1jbyfhqk74wsdjxzqi0hcrgc7ha4q8cyjx96nv6w9bjg1b5vlzq4"))))
     (build-system pyproject-build-system)
     (arguments
      (list
       #:test-flags
       #~(list "--pyargs" "astroquery"
-              "-m" "not remote_data")
+              "-m" "not remote_data"
+              ;; Some tests failed with parallel run, see
+              ;; <https://github.com/astropy/astroquery/issues/2968>.
+              ;; "-n" "auto"
+              "-k" (string-append
+                    ;; Failed: DID NOT RAISE <class
+                    ;; 'astropy.utils.exceptions.AstropyDeprecationWarning'>
+                    "not test_raises_deprecation_warning"))
       #:phases
       #~(modify-phases %standard-phases
-          (add-before 'check 'prepare-test-environment
-            (lambda _
-              (setenv "HOME" (getcwd)) ; some tests need a writable home
-              ;; To solve pytest/conftest issue. Pytest tries to load all
-              ;; files with word 'test' in them.
-              ;;
-              ;; ImportError while loading conftest ...
-              ;; _pytest.pathlib.ImportPathMismatchError: ...
-              ;;
-              (call-with-output-file "pytest.ini"
-                (lambda (port)
-                  (format port "[pytest]
-python_files = test_*.py"))))))))
+          (replace 'check
+            (lambda* (#:key tests? test-flags #:allow-other-keys)
+              (when tests?
+                ;; Some tests require write access to $HOME.
+                (setenv "HOME" "/tmp")
+                ;; Step out of the source directory to avoid interference;
+                ;; we want to run the installed code with extensions etc.
+                (with-directory-excursion "/tmp"
+                  (apply invoke "pytest" "-v" test-flags))))))))
     (propagated-inputs
      (list python-astropy
            python-beautifulsoup4
-- 
2.41.0





This bug report was last modified 1 year and 110 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.