diff mbox series

[bug#48920,1/2] gnu: python-toolz: Enable tests.

Message ID 20210608133303.326867-1-monego@posteo.net
State Accepted
Headers show
Series [bug#48920,1/2] gnu: python-toolz: Enable tests. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Vinicius Monego June 8, 2021, 1:33 p.m. UTC
* gnu/packages/python-xyz.scm (python-toolz)[arguments]: Remove #:tests?.
Override check phase.
[native-inputs]: Add python-pytest.
---
 gnu/packages/python-xyz.scm | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

Comments

Leo Famulari June 8, 2021, 5:18 p.m. UTC | #1
On Tue, Jun 08, 2021 at 01:33:03PM +0000, Vinicius Monego wrote:
> * gnu/packages/python-xyz.scm (python-toolz)[arguments]: Remove #:tests?.
> Override check phase.
> [native-inputs]: Add python-pytest.

Thanks! Pushed as 74c70553394e32f7b6d5fa56da3bf3b18623c70f
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0d6c9fc2c5..c724357c11 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -21341,9 +21341,17 @@  library's @code{threading} module.")
         (base32
          "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
     (build-system python-build-system)
-    ;; FIXME: tests cannot be computed: "Can't perform this operation for
-    ;; unregistered loader type"
-    (arguments '(#:tests? #f))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "python" "-m" "pytest" "--doctest-modules"
+                       "--pyargs" "toolz")))))))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
     (home-page "https://github.com/pytoolz/toolz/")
     (synopsis "List processing tools and functional utilities")
     (description