guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

38/46: gnu: python-jinja2: Run the tests.


From: guix-commits
Subject: 38/46: gnu: python-jinja2: Run the tests.
Date: Fri, 14 Feb 2020 12:41:06 -0500 (EST)

mbakke pushed a commit to branch staging
in repository guix.

commit dce9b8b52c0726805e4e8f223e7cc9839d7bf7cf
Author: Marius Bakke <address@hidden>
AuthorDate: Wed Feb 12 20:13:40 2020 +0100

    gnu: python-jinja2: Run the tests.
    
    * gnu/packages/python-xyz.scm (python-jinja2)[native-inputs]: Add 
PYTHON-PYTEST.
    [arguments]: New field.
---
 gnu/packages/python-xyz.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0457fa9..63d6f4b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -2459,6 +2459,20 @@ for Python.")
         (base32
          "0l72c11n959yzb8d3ankckb6yhjhm6x729zm7rkpk040qzxpy64k"))))
     (build-system python-build-system)
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (replace 'check
+                    (lambda* (#:key tests? #:allow-other-keys)
+                      (if tests?
+                          (begin
+                            (setenv "PYTHONPATH"
+                                    (string-append "./build/lib:"
+                                                   (getenv "PYTHONPATH")))
+                            (invoke "pytest" "-vv"))
+                          (format #t "test suite not run~%"))
+                      #t)))))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
     (propagated-inputs
      `(("python-markupsafe" ,python-markupsafe)))
     (home-page "http://jinja.pocoo.org/";)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]