guix-commits
[Top][All Lists]
Advanced

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

04/13: gnu: Add python-pytest-console-scripts.


From: guix-commits
Subject: 04/13: gnu: Add python-pytest-console-scripts.
Date: Mon, 30 Aug 2021 12:50:50 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit 43a6152432259865e489fa4a62ce94e33376bf79
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Fri Aug 27 17:56:43 2021 +0200

    gnu: Add python-pytest-console-scripts.
    
    * gnu/packages/python-check.scm (python-pytest-console-scripts): New 
variable.
---
 gnu/packages/python-check.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 038ca17..8577c8a 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -1100,6 +1100,39 @@ also ensuring that the notebooks are running without 
errors.")
      "This pytest plugin provides fixtures to simplify Flask app testing.")
     (license license:expat)))
 
+(define-public python-pytest-console-scripts
+  (package
+    (name "python-pytest-console-scripts")
+    (version "1.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-console-scripts" version))
+       (sha256
+        (base32
+         "073l2cz11013dl30zjr575ms78j9b2bsbdl1w0gmig37spbkh8aa"))))
+    (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 "pytest" "--verbose"
+                       ;; This one test fails because of PATH assumptions
+                       "-k" "not test_elsewhere_in_the_path")))))))
+    (propagated-inputs
+     `(("python-mock" ,python-mock)
+       ("python-pytest" ,python-pytest)))
+    (native-inputs
+     `(("python-setuptools-scm" ,python-setuptools-scm)))
+    (home-page "https://github.com/kvas-it/pytest-console-scripts";)
+    (synopsis "Pytest plugin for testing console scripts")
+    (description
+     "This package provides a pytest plugin for testing console scripts.")
+    (license license:expat)))
+
 (define-public python-pytest-env
   (package
     (name "python-pytest-env")



reply via email to

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