summary refs log tree commit diff
path: root/gnu/packages/python-check.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-01-22 09:28:52 +0100
committerMarius Bakke <marius@gnu.org>2022-01-22 10:23:01 +0100
commit36481d00de7137d055368f92c409c917a6fadfe8 (patch)
treebf069d61a3dc5ef01e3899fe5474957d3a0c7360 /gnu/packages/python-check.scm
parentaf473726b20ca8a3128062fb1a4a544de31b0b37 (diff)
downloadguix-36481d00de7137d055368f92c409c917a6fadfe8.tar.gz
gnu: Add python-pytest-metadata.
* gnu/packages/python-check.scm (python-pytest-metadata): New variable.
Diffstat (limited to 'gnu/packages/python-check.scm')
-rw-r--r--gnu/packages/python-check.scm29
1 files changed, 28 insertions, 1 deletions
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 9eee1a621c..2ab6686bbc 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -5,7 +5,7 @@
 ;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2019, 2021 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
-;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
@@ -44,6 +44,7 @@
   #:use-module (guix utils)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix download)
   #:use-module (guix build-system python))
@@ -524,6 +525,32 @@ namespace which can be used to register helper functions without requiring
 someone to import them in their actual tests to use them.")
     (license license:asl2.0)))
 
+(define-public python-pytest-metadata
+  (package
+    (name "python-pytest-metadata")
+    (version "1.11.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-metadata" version))
+       (sha256
+        (base32 "1wgcz0w053lnjln0081kjmfflaq7bwncxdzx7k63kr9lkpa0ddbi"))))
+    (build-system python-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (replace 'check
+                 (lambda* (#:key tests? #:allow-other-keys)
+                   (when tests?
+                     (invoke "pytest" "-vv")))))))
+    (native-inputs (list python-pytest python-setuptools-scm))
+    (home-page "https://github.com/pytest-dev/pytest-metadata")
+    (synopsis "Access test session metadata with Pytest")
+    (description
+     "@code{pytest-metadata} is a @command{pytest} plugin that provides
+access to test session metadata.")
+    (license license:mpl2.0)))
+
 (define-public python-pytest-openfiles
   (package
     (name "python-pytest-openfiles")