diff mbox series

[bug#48842,1/6] gnu: Add python-pytest-datadir.

Message ID 20210605014655.18459-1-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-datadir): New variable.
---
 gnu/packages/python-check.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

Comments

Xinglu Chen June 5, 2021, 1:24 p.m. UTC | #1
On Sat, Jun 05 2021, Vinicius Monego wrote:

> +(define-public python-pytest-datadir
> +  (package
> +    (name "python-pytest-datadir")
> +    (version "1.3.1")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "pytest-datadir" version))
> +       (sha256
> +        (base32 "066bg6wlzgq2pqnjp73dfrcmk8951xw3aqcxa3p1axgqimrixbyk"))))
> +    (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")))))))
> +    (propagated-inputs
> +     `(("python-pathlib2" ,python-pathlib2)))
> +    (native-inputs
> +     `(("python-pytest" ,python-pytest)
> +       ("python-setuptools-scm" ,python-setuptools-scm)))
> +    (home-page "https://github.com/gabrielcnr/pytest-datadir")
> +    (synopsis "Pytest plugin for test data directories and files")
> +    (description
> +     "Pytest plugin for test data directories and files.")

The description should consist of one or more full sentences.
diff mbox series

Patch

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 1206dda5c4..abcbb6d805 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -882,6 +882,36 @@  framework.")
 for the @code{pytest} framework.")
     (license license:expat)))
 
+(define-public python-pytest-datadir
+  (package
+    (name "python-pytest-datadir")
+    (version "1.3.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-datadir" version))
+       (sha256
+        (base32 "066bg6wlzgq2pqnjp73dfrcmk8951xw3aqcxa3p1axgqimrixbyk"))))
+    (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")))))))
+    (propagated-inputs
+     `(("python-pathlib2" ,python-pathlib2)))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-setuptools-scm" ,python-setuptools-scm)))
+    (home-page "https://github.com/gabrielcnr/pytest-datadir")
+    (synopsis "Pytest plugin for test data directories and files")
+    (description
+     "Pytest plugin for test data directories and files.")
+    (license license:expat)))
+
 (define-public python-pytest-benchmark
   (package
     (name "python-pytest-benchmark")