diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2021-11-20 15:35:41 +0100 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2021-11-20 16:22:53 +0100 |
commit | 3d56b8af9046c056e68955ce4d929f18d796e33a (patch) | |
tree | ed5f72ab4f3f4b1e8155ec1ef09c7677a02334a2 /gnu | |
parent | 7ca5dc370da168a645a9f4aebb89c893936966b1 (diff) | |
download | guix-3d56b8af9046c056e68955ce4d929f18d796e33a.tar.gz |
gnu: python-scikit-learn: Run tests conditionally.
* gnu/packages/machine-learning.scm (python-scikit-learn)[arguments]: Respect TESTS? in 'check phase.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/machine-learning.scm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 4e18cf0517..d51bf63473 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -944,14 +944,15 @@ computing environments.") (add-after 'build 'build-ext (lambda _ (invoke "python" "setup.py" "build_ext" "--inplace"))) (replace 'check - (lambda _ - ;; Restrict OpenBLAS threads to prevent segfaults while testing! - (setenv "OPENBLAS_NUM_THREADS" "1") + (lambda* (#:key tests? #: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") - (invoke "pytest" "sklearn" "-m" "not network"))) + (invoke "pytest" "sklearn" "-m" "not network")))) (add-before 'reset-gzip-timestamps 'make-files-writable (lambda* (#:key outputs #:allow-other-keys) ;; Make sure .gz files are writable so that the |