guix_mirror_bot pushed a commit to branch master
in repository guix.

commit a7c475b6a77f35ea32254663b2c9dfaee018841e
Author: Nicolas Graves <[email protected]>
AuthorDate: Wed Feb 11 11:34:44 2026 +0100

    gnu: python-hyperopt: Fix tests.
    
    * gnu/packages/machine-learning.scm (python-hyperopt)[arguments]
    <#:test-flags>: Don't run slow tests.
    <#:phases>: Add phase 'patch-tests.
    
    Change-Id: I1fa9a0968291ea9ef7c75dd3ab7d19edc14279b2
    Reviewed-by: Hugo Buddelmeijer <[email protected]>
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/machine-learning.scm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/machine-learning.scm 
b/gnu/packages/machine-learning.scm
index 98008eb3b7..5dd882fa20 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -3153,7 +3153,8 @@ interactive learning.")
     (arguments
      (list
       #:test-flags
-      #~(list "--ignore=hyperopt/tests/integration/"
+      #~(list "-m" "not slow"
+              "--ignore=hyperopt/tests/integration/"
               #$@(map (lambda (test) (string-append "--deselect="
                                                     "hyperopt/tests/unit/"
                                                     test))
@@ -3169,7 +3170,14 @@ interactive learning.")
                             "test_atpe_basic.py::test_run_basic_search"
                             ;; TypeError: unsupported operand type(s) for -:
                             ;; 'method' and 'int'
-                            
"test_rdists.py::TestLogUniform::test_distribution_rvs")))))
+                            
"test_rdists.py::TestLogUniform::test_distribution_rvs")))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-tests
+            (lambda _
+              (substitute* "hyperopt/tests/test_base.py"
+                (("assertEquals")
+                 "assertEqual")))))))
     (native-inputs
      (list python-pymongo
            python-pynose        ;fails more without extra test runner

Reply via email to