summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2026-01-15 10:26:15 +0000
committerSharlatan Hellseher <sharlatanus@gmail.com>2026-01-30 09:10:09 +0000
commitcb46515547d3943ad5c72ddb6bf47d6439b58fdf (patch)
treee122c3fe1736299456b77a70165d19557932b4c0 /gnu
parentd8f3e15f002b4d783e91d375fc4c38f3fc429622 (diff)
gnu: python-astroquery: Simplify and improve tests.
* gnu/packages/astronomy.scm (python-astroquery): [arguments] <test-flags>: Rework skipped tests. <phases>: Use default 'check; add 'pre-check. [native-inputs]: Add python-pytest-rerunfailures and python-pytest-timeout. [propagated-inputs]: Sort a->z; group by priority. Change-Id: I54db4c66d8f97829e7015074e3c26d22629e4999
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/astronomy.scm47
1 files changed, 21 insertions, 26 deletions
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 255047f1e6..d3e0a3b4b2 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -3346,53 +3346,48 @@ celestial-to-terrestrial coordinate transformations.")
(build-system pyproject-build-system)
(arguments
(list
+ ;; Tests are not thread save, see:
+ ;; <https://github.com/astropy/astroquery/issues/2968>.
+ ;;
+ ;; tests: 1823 passed, 21 skipped, 2047 deselected, 2 xfailed
#:test-flags
#~(list "--pyargs" "astroquery"
"-m" "not remote_data"
- ;; Some tests failed with parallel run, see
- ;; <https://github.com/astropy/astroquery/issues/2968>.
- ;; "-n" "auto"
"-k" (string-join
- (list
- ;; Failed: DID NOT RAISE <class
- ;; 'astropy.utils.exceptions.AstropyDeprecationWarning'>
- "not test_raises_deprecation_warning"
- ;; E fixture 'tmp_cwd' not found
- "test_download_cache"
- "test_download_local"
- "test_download_table"
- "test_read_uncompressed")
+ ;; E fixture 'tmp_cwd' not found
+ (list "not test_download_cache"
+ "test_download_local"
+ "test_download_table"
+ "test_read_uncompressed")
" and not "))
#:phases
#~(modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? test-flags #:allow-other-keys)
- (when tests?
- ;; 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" "-v" test-flags))))))))
+ (add-before 'check 'pre-check
+ (lambda _
+ (setenv "HOME" "/tmp")
+ (delete-file-recursively "astroquery"))))))
(native-inputs
(list nss-certs-for-test
python-matplotlib
python-pytest-astropy
python-pytest-dependency
python-pytest-doctestplus
+ python-pytest-rerunfailures
+ python-pytest-timeout
python-setuptools))
(propagated-inputs
(list python-astropy
- python-astropy-healpix
python-beautifulsoup4
- python-boto3
python-html5lib
python-keyring
- ;; python-mocpy : Not packed yet, optional and Rust is required
python-numpy
python-pyvo
- python-regions
- python-requests))
+ python-requests
+ ;; [optional]
+ python-astropy-healpix
+ python-boto3
+ ;; python-mocpy ;not packaged yet in Guix
+ python-regions))
(home-page "https://astroquery.readthedocs.io/en/latest/index.html")
(synopsis "Access online astronomical data resources")
(description