diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2023-11-17 12:16:19 +0000 |
---|---|---|
committer | Eric Bavier <bavier@posteo.net> | 2023-11-18 19:56:32 -0600 |
commit | 1144680dab4aece86e21b6749ab19a4d2a3df23c (patch) | |
tree | b2fd55824b3d93f5c489c6b644403d6529277988 /gnu/packages/astronomy.scm | |
parent | ba3a3aa311147afc4c1be941e79c557c73726a44 (diff) | |
download | guix-1144680dab4aece86e21b6749ab19a4d2a3df23c.tar.gz |
gnu: python-synphot: Enable tests.
* gnu/packages/astronomy.scm (python-synphot): Enable tests. [arguments]{phases}: Add 'prepare-test-environment phase. Change-Id: Ie577ef16794fbd99ec73e39bdc8d8e1645e35532 Signed-off-by: Eric Bavier <bavier@posteo.net>
Diffstat (limited to 'gnu/packages/astronomy.scm')
-rw-r--r-- | gnu/packages/astronomy.scm | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index f19f40a69d..bf419ae526 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -3712,9 +3712,21 @@ datetime object.") (build-system pyproject-build-system) (arguments (list - ;; XXX: Test needs more love to pass. - ;; ERROR collecting synphot/tests/test_utils.py - #:tests? #f)) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'prepare-test-environment + (lambda _ + (invoke "python" "setup.py" "build_ext" "--inplace") + ;; To solve pytest/conftest issue. Pytest tries to load all + ;; files with word 'test' in them. + ;; + ;; ImportError while loading conftest ... + ;; _pytest.pathlib.ImportPathMismatchError: ... + ;; + (call-with-output-file "pytest.ini" + (lambda (port) + (format port "[pytest] +python_files = test_*.py")))))))) (propagated-inputs (list python-astropy python-numpy python-scipy)) (native-inputs (list python-pytest python-pytest-astropy python-setuptools-scm)) |