guix-patches
[Top][All Lists]
Advanced

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

[bug#48842] [PATCH v2 2/7] gnu: Add python-pytest-regressions.


From: Vinicius Monego
Subject: [bug#48842] [PATCH v2 2/7] gnu: Add python-pytest-regressions.
Date: Mon, 7 Jun 2021 11:20:46 +0000

* gnu/packages/python-check.scm (python-pytest-regressions): New variable.
---
Rebasing only.

 gnu/packages/python-check.scm | 43 +++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 3bdd11d4f5..7c8e6546a2 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -35,9 +35,11 @@
   #:use-module (gnu packages django)
   #:use-module (gnu packages openstack)
   #:use-module (gnu packages python-build)
+  #:use-module (gnu packages python-science)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages sphinx)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -912,6 +914,47 @@ for the @code{pytest} framework.")
 data directories and files.")
     (license license:expat)))
 
+(define-public python-pytest-regressions
+  (package
+    (name "python-pytest-regressions")
+    (version "2.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-regressions" version))
+       (sha256
+        (base32 "05jpsvv8rj8i4x24fphpnar5dl4s6d6bw6ikjk5d8v96rdviz9qm"))))
+    (build-system python-build-system)
+    (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"
+                       ;; DeprecrationWarning.
+                       "-k" "not test_image_regression")))))))
+    (propagated-inputs
+     `(("python-pytest-datadir" ,python-pytest-datadir)
+       ("python-pyyaml" ,python-pyyaml)))
+    (native-inputs
+     `(("python-matplotlib" ,python-matplotlib)
+       ("python-numpy" ,python-numpy)
+       ("python-pandas" ,python-pandas)
+       ("python-pillow" ,python-pillow)
+       ("python-pytest" ,python-pytest)
+       ("python-restructuredtext-lint"
+        ,python-restructuredtext-lint)
+       ("python-setuptools-scm" ,python-setuptools-scm)))
+    (home-page "https://github.com/ESSS/pytest-regressions";)
+    (synopsis "Easy to use fixtures to write regression tests")
+    (description
+     "This Pytest plugin makes it simple to test general data, images, files,
+and numeric tables by saving expected data in a data directory that can be
+used to verify that future runs produce the same data.")
+    (license license:expat)))
+
 (define-public python-pytest-benchmark
   (package
     (name "python-pytest-benchmark")
-- 
2.31.1






reply via email to

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