From cb46515547d3943ad5c72ddb6bf47d6439b58fdf Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Thu, 15 Jan 2026 10:26:15 +0000 Subject: gnu: python-astroquery: Simplify and improve tests. * gnu/packages/astronomy.scm (python-astroquery): [arguments] : Rework skipped tests. : 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 --- gnu/packages/astronomy.scm | 47 +++++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 26 deletions(-) (limited to 'gnu') 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: + ;; . + ;; + ;; 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 - ;; . - ;; "-n" "auto" "-k" (string-join - (list - ;; Failed: DID NOT RAISE - "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 -- cgit v1.3