Archived
1
0
Fork 0

gnu: python-scikit-learn-extra: Disable a validation test.

* gnu/packages/machine-learning.scm (python-scikit-learn-extra)[arguments]:
Disable one test.

Change-Id: I1309cb6a82dee1a714ddec59aa90692ccfcd885b
This commit is contained in:
Ricardo Wurmus 2024-05-03 11:54:36 +02:00
parent 1ea0e3e6dd
commit c226d12856
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -1762,26 +1762,30 @@ data analysis.")
#:test-flags
;; ignore tests that require network
'(list "--pyargs" "sklearn_extra"
"-k" "not test_build")
"-k" (string-append "not test_build"
;; The error message format has changed,
;; but the behavior itself is still the
;; same.
" and not test_parameter_validation"))
#:phases
#~(modify-phases %standard-phases
(add-after 'build 'build-ext
(lambda _
(invoke "python" "setup.py" "build_ext"
"--inplace")))
(replace 'check
(lambda* (#:key tests? test-flags #:allow-other-keys)
(when tests?
;; Restrict OpenBLAS threads to prevent segfaults while testing!
(setenv "OPENBLAS_NUM_THREADS" "1")
#~(modify-phases %standard-phases
(add-after 'build 'build-ext
(lambda _
(invoke "python" "setup.py" "build_ext"
"--inplace")))
(replace 'check
(lambda* (#:key tests? test-flags #:allow-other-keys)
(when tests?
;; Restrict OpenBLAS threads to prevent segfaults while testing!
(setenv "OPENBLAS_NUM_THREADS" "1")
;; Some tests require write access to $HOME.
(setenv "HOME" "/tmp")
;; 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" "-vv" test-flags))))))))
;; 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" "-vv" test-flags))))))))
(propagated-inputs
(list python-numpy
python-scikit-learn