diff mbox series

[bug#69924,11/49] gnu: python-zarr: Speed up tests.

Message ID c930e293bcbd71ef316ef0ec16666ea90efa0391.1710967273.git.sharlatanus@gmail.com
State New
Headers show
Series gnu: Astronomy 2024/02 updates. | expand

Commit Message

Sharlatan Hellseher March 20, 2024, 10:27 p.m. UTC
* gnu/packages/python-xyz.scm (python-zarr): Use G-expressions.
[arguments] <#:test-flags>: Parallelize tests to speed them up.
<#:phases>: 'disable-service-tests remove trailing #t from
lambda. Use standard 'check phase.
[native-inputs]: Add python-fsspec, python-h5py,
python-pytest-doctestplus, python-pytest-timeout, and
python-pytest-xdist.

Change-Id: I3fc4e2a1649ad9f95ed9e3fe87e3f57ad4f58af8
---
 gnu/packages/python-xyz.scm | 34 ++++++++++++++++++++--------------
 1 file changed, 20 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 799174ab60..360b4db3f1 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26979,23 +26979,29 @@  (define-public python-zarr
          "0qb2wj60i7v1c95k6m0pskx20ss6dxrj3ym0d7z4c98jfah3ljsn"))))
     (build-system pyproject-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'disable-service-tests
-           (lambda _
-             (setenv "ZARR_TEST_ABS" "0")
-             (setenv "ZARR_TEST_MONGO" "0")
-             (setenv "ZARR_TEST_REDIS" "0")
-             #t))
-         (replace 'check
-           (lambda _
-             (invoke "pytest" "-vv" "-k" "not lmdb")
-             #t)))))
+     (list
+      #:test-flags
+      #~(list "-n" "auto")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'disable-service-tests
+            (lambda _
+              (setenv "ZARR_TEST_ABS" "0")
+              (setenv "ZARR_TEST_MONGO" "0")
+              (setenv "ZARR_TEST_REDIS" "0"))))))
     (propagated-inputs
-     (list python-asciitree python-fasteners python-numcodecs
+     (list python-asciitree
+           python-fasteners
+           python-numcodecs
            python-numpy))
     (native-inputs
-     (list python-pytest python-setuptools-scm))
+     (list python-fsspec
+           python-pytest
+           python-h5py
+           python-pytest-doctestplus
+           python-pytest-timeout
+           python-pytest-xdist
+           python-setuptools-scm))
     (home-page "https://github.com/zarr-developers/zarr-python")
     (synopsis "Chunked, compressed, N-dimensional arrays for Python")
     (description