diff mbox series

[bug#48842,2/6] gnu: Add python-pytest-regressions.

Message ID 20210605014655.18459-2-monego@posteo.net
State New
Headers show
Series gnu: Add python-myst-parser. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Vinicius Monego June 5, 2021, 1:46 a.m. UTC
* gnu/packages/python-check.scm (python-pytest-regressions): New variable.
---
 gnu/packages/python-check.scm | 43 +++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index abcbb6d805..19e9766229 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.")
      "Pytest plugin for test 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")