summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2024-04-18 10:20:21 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-04-30 21:36:13 +0100
commit03776790b707f6c4572c8ea85a22301ab6b632b3 (patch)
treed0f552e636e58db68f461c483788c02e924bcc52
parente08aa7a38035d575a9c0052619ef78e1d5772ae6 (diff)
downloadguix-patches-03776790b707f6c4572c8ea85a22301ab6b632b3.tar
guix-patches-03776790b707f6c4572c8ea85a22301ab6b632b3.tar.gz
gnu: python-reproject: Enable tests.
* gnu/packages/astronomy.scm (python-reproject): Enable tests. [arguments]: <#:tests-flags>: Add them as seen in tox.ini. <#:phases>: Rename 'writable-home to 'prepare-test-environment to reflect purpose and build extension before tests. [native-inputs]: Add python-xdist. Change-Id: I7a5454e3ce241b7a54626f8aba27602b4965c25b
-rw-r--r--gnu/packages/astronomy.scm25
1 files changed, 12 insertions, 13 deletions
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index efd364277b..47a8517b58 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -2742,16 +2742,11 @@ setup(ext_modules=get_extensions())")))))
(build-system pyproject-build-system)
(arguments
(list
- ;; FIXME: Failing tests
- ;;
- ;; reproject/adaptive/core.py:7: in <module>
- ;; from .deforest import map_coordinates
- ;; E ModuleNotFoundError: No module named 'reproject.adaptive.deforest'
- ;;
- ;; Project removed setup.py and there is no alternative to `python
- ;; setup.py build_ext'
- ;; See: https://github.com/pypa/setuptools/discussions/3388
- #:tests? #f
+ #:test-flags
+ #~(list "--arraydiff"
+ "--arraydiff-default-format=fits"
+ "--numprocesses" "auto"
+ "--pyargs" "reproject")
#:phases
#~(modify-phases %standard-phases
;; setup.py was removed in a659a260bdd7635cddc8f33c4ea04a3b6d8c1f84
@@ -2771,9 +2766,11 @@ setup(ext_modules=get_extensions())")))))
(add-before 'check 'writable-compiler
(lambda _
(make-file-writable "reproject/_compiler.c")))
- (add-before 'check 'writable-home
+ (add-before 'check 'prepare-test-environment
(lambda _
- (setenv "HOME" (getcwd)))))))
+ (setenv "HOME" "/tmp")
+ ;; Cython extensions have to be built before running the tests.
+ (invoke "python" "setup.py" "build_ext" "--inplace"))))))
(propagated-inputs
(list python-asdf
python-astropy
@@ -2791,9 +2788,11 @@ setup(ext_modules=get_extensions())")))))
(native-inputs
(list python-cython-3
python-extension-helpers
+ python-pytest
python-pytest-astropy
+ python-pytest-xdist
+ ;; python-sunpy ; circular dependencies, test optional
python-semantic-version
- python-pytest
python-setuptools-scm))
(home-page "https://reproject.readthedocs.io")
(synopsis "Astronomical image reprojection in Python")