mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-sunpy: Fix tests.
* gnu/packages/astronomy.scm (python-sunpy) [arguments] <test-flags>: Skip one test introducing time bomb. <phases>: Add 'pre-check and move set HOME here from 'check. Change-Id: I20e3f63aa45c951bd7b093e0d02e4968aca87dc3
This commit is contained in:
parent
cf633f1194
commit
43d6e5eefb
1 changed files with 13 additions and 4 deletions
|
@ -7415,18 +7415,27 @@ and @code{astropy}.")
|
||||||
(list
|
(list
|
||||||
#:test-flags
|
#:test-flags
|
||||||
#~(list "--pyargs" "sunpy"
|
#~(list "--pyargs" "sunpy"
|
||||||
"--numprocesses" (number->string (min 8 (parallel-job-count))))
|
"--numprocesses" (number->string (min 8 (parallel-job-count)))
|
||||||
|
;; Test introduces a time bomb and fails with error: ValueError:
|
||||||
|
;; interpolating from IERS_Auto using predictive values that are
|
||||||
|
;; more than 30.0 days old.
|
||||||
|
"-k" "not test_print_params")
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'remove-test-files
|
(add-after 'unpack 'remove-test-files
|
||||||
|
;; Requires SpicePy wich is not packed in Guix yet and can't be
|
||||||
|
;; ignored with Pytet options for some reason.
|
||||||
(lambda _
|
(lambda _
|
||||||
;; Requires SpicePy wich is not packed in Guix yet and can't be
|
|
||||||
;; ignored with Pytet options for some reason.
|
|
||||||
(delete-file "sunpy/coordinates/tests/test_spice.py")))
|
(delete-file "sunpy/coordinates/tests/test_spice.py")))
|
||||||
|
(add-before 'check 'pre-check
|
||||||
|
;; It requires during sanity check as well to prevent error like:
|
||||||
|
;; PermissionError: [Errno 13] Permission denied:
|
||||||
|
;; '/homeless-shelter'
|
||||||
|
(lambda _
|
||||||
|
(setenv "HOME" "/tmp")))
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda* (#:key tests? test-flags #:allow-other-keys)
|
(lambda* (#:key tests? test-flags #:allow-other-keys)
|
||||||
(when tests?
|
(when tests?
|
||||||
(setenv "HOME" "/tmp")
|
|
||||||
(with-directory-excursion "/tmp"
|
(with-directory-excursion "/tmp"
|
||||||
(apply invoke "pytest" "-vv" test-flags))))))))
|
(apply invoke "pytest" "-vv" test-flags))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue