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


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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 67237 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 21/32] gnu: python-extension-helpers: Enable tests.
Date: Fri, 17 Nov 2023 12:16:10 +0000
* gnu/packages/python-xyz.scm (python-extension-helpers): Enable tests.
[arguments]{phases}: Add 'prepare-test-environment phase.

Change-Id: I6effa60f3ccd334d11b5f86162742f2272f737b1
---
 gnu/packages/python-xyz.scm | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 318ce539db..6d3e30a91e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -4254,9 +4254,22 @@ (define-public python-extension-helpers
       (sha256
         (base32 "1rjha07ds633fb81hn3i2yzk3v2flbi6qa091ix4mkvrgk3gl6ya"))))
   (build-system pyproject-build-system)
-  ;; FIXME: pytest failed to load test suit, find out why.
-  ;;  - _pytest.pathlib.ImportPathMismatchError: ('extension_helpers.conftes
-  (arguments (list #:tests? #f))
+  (arguments
+   (list
+    #:phases
+    #~(modify-phases %standard-phases
+        (add-before 'check 'prepare-test-environment
+          (lambda _
+            ;; 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"))))))))
   (native-inputs
     (list python-coverage
           python-pytest
-- 
2.41.0





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

Previous Next


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