GNU bug report logs - #67237
[PATCH 00/32] gnu: Astronomy 2023/11 updates.

Previous Next

Package: guix-patches;

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

Date: Fri, 17 Nov 2023 10:09:02 UTC

Severity: normal

Tags: patch

Done: Eric Bavier <bavier <at> posteo.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 67237 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>, Andreas Enge <andreas <at> enge.fr>, Efraim Flashner <efraim <at> flashner.co.il>, Eric Bavier <bavier <at> posteo.net>
Subject: [bug#67237] [PATCH 30/32] gnu: python-synphot: Enable tests.
Date: Fri, 17 Nov 2023 12:16:19 +0000
* gnu/packages/astronomy.scm (python-synphot): Enable tests.
[arguments]{phases}: Add 'prepare-test-environment phase.

Change-Id: Ie577ef16794fbd99ec73e39bdc8d8e1645e35532
---
 gnu/packages/astronomy.scm | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index f19f40a69d..bf419ae526 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -3712,9 +3712,21 @@ (define-public python-synphot
     (build-system pyproject-build-system)
     (arguments
      (list
-      ;; XXX: Test needs more love to pass.
-      ;; ERROR collecting synphot/tests/test_utils.py
-      #:tests? #f))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check 'prepare-test-environment
+            (lambda _
+              (invoke "python" "setup.py" "build_ext" "--inplace")
+              ;; 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"))))))))
     (propagated-inputs (list python-astropy python-numpy python-scipy))
     (native-inputs (list python-pytest python-pytest-astropy
                          python-setuptools-scm))
-- 
2.41.0





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

Previous Next


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