summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-02-28 05:04:26 +0100
committerMarius Bakke <mbakke@fastmail.com>2018-02-28 13:59:03 +0100
commit2441239842fa6f786008e8c75651342b2c0172d2 (patch)
tree9fa014938912d2fc027757ef5c1cb4f5f084cc0b /gnu/packages
parent0075644662acf58287f9ad825c5b8386b216a1fc (diff)
gnu: python-msgpack: Run the tests.
* gnu/packages/python.scm (python-msgpack)[arguments]: Add #:modules. Replace CHECK-PHASE with pytest invocation. [native-inputs]: Add PYTHON-PYTEST.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/python.scm20
1 files changed, 20 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 32fcea480b..80ea4caf76 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -5840,6 +5840,26 @@ should be stored on various operating systems.")
(base32
"1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
(build-system python-build-system)
+ (arguments
+ `(#:modules ((guix build utils)
+ (guix build python-build-system)
+ (ice-9 ftw)
+ (srfi srfi-1)
+ (srfi srfi-26))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (let ((cwd (getcwd)))
+ (setenv "PYTHONPATH"
+ (string-append cwd "/build/"
+ (find (cut string-prefix? "lib" <>)
+ (scandir (string-append cwd "/build")))
+ ":"
+ (getenv "PYTHONPATH")))
+ (invoke "pytest" "-v" "test")))))))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
(synopsis "MessagePack (de)serializer")
(description "MessagePack is a fast, compact binary serialization format,
suitable for similar data to JSON. This package provides CPython bindings for