andreas pushed a commit to branch python-team
in repository guix.

commit 6b1baefaf327ecbc3fddc6e4b2fbb2c739b995aa
Author: Sharlatan Hellseher <sharlata...@gmail.com>
AuthorDate: Sat Apr 5 21:55:39 2025 +0100

    gnu: python-orange-canvas-core: Fix tests.
    
    * gnu/packages/orange.scm: Add (gnu packages python-check).
    (python-orange-canvas-core) [arguments] <tests-flags>: Skip some tests
    failing to call Qt event loop.
    [phases]{pre-check}: Set environment variable for QT_PLUGIN_PATH.
    [inputs]: Add qtbase.
    [native-inputs]: Add python-pytest-qt.
    
    Change-Id: Ibb576b1bd10aeb6edf79a52fdf5d5d8e26ee5172
---
 gnu/packages/orange.scm | 31 +++++++++++++++++++++++++------
 1 file changed, 25 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/orange.scm b/gnu/packages/orange.scm
index 9cc1f29767..3240ede663 100644
--- a/gnu/packages/orange.scm
+++ b/gnu/packages/orange.scm
@@ -31,6 +31,7 @@
   #:use-module (gnu packages graph)
   #:use-module (gnu packages machine-learning)
   #:use-module (gnu packages python-build)
+  #:use-module (gnu packages python-check)
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-science)
   #:use-module (gnu packages python-web)
@@ -59,24 +60,42 @@
                      "test_copy_cut_paste"
                      ;; AttributeError: 'NoneType' object has no attribute
                      ;; 'isEnabled'
-                     "test_item_context_menu")
+                     "test_item_context_menu"
+                     ;; Tests fail with error: Failed: CALL ERROR: Exceptions
+                     ;; caught in Qt event loop.
+                     "test_create_new_window"
+                     "test_new_window"
+                     "test_dont_load_swp_on_new_window"
+                     "test_toolbox"
+                     "test_widgettoolgrid"
+                     "test_editlinksnode"
+                     "test_links_edit"
+                     "test_links_edit_widget"
+                     "test_flattened"
+                     "test_tooltree_registry")
                     " and not "))
       #:phases
       #~(modify-phases %standard-phases
-         (add-after 'unpack 'relax-requirements
-           (lambda _
-             (substitute* "setup.py"
-               ;; Relax hard requirment of PIP.
-               ((".*pip>=18.0.*") ""))))
+          (add-after 'unpack 'relax-requirements
+            (lambda _
+              (substitute* "setup.py"
+                ;; Relax hard requirment of PIP.
+                ((".*pip>=18.0.*") ""))))
           (add-before 'check 'pre-check
             (lambda _
               (setenv "HOME" "/tmp")
+              (setenv "QT_PLUGIN_PATH"
+                      (string-append #$(this-package-input "qtbase") 
"/lib/qt6/plugins:"
+                                     (getenv "QT_PLUGIN_PATH")))
               (setenv "QT_QPA_PLATFORM" "offscreen"))))))
     (native-inputs
      (list python-pytest
+           python-pytest-qt
            python-setuptools
            python-trubar
            python-wheel))
+    (inputs
+     (list qtbase))
     (propagated-inputs
      (list python-anyqt
            python-cachecontrol

Reply via email to