guix-commits
[Top][All Lists]
Advanced

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

04/05: gnu: Add python-pytest-httpx.


From: guix-commits
Subject: 04/05: gnu: Add python-pytest-httpx.
Date: Thu, 16 Jun 2022 03:26:56 -0400 (EDT)

htgoebel pushed a commit to branch master
in repository guix.

commit 9ee6d9cb176e09b07c64cf1a2bf30c0d2d3c0ade
Author: Hartmut Goebel <h.goebel@crazy-compilers.com>
AuthorDate: Fri Aug 27 15:46:56 2021 +0200

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

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index cb22972d10..8302e2e09f 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -2293,3 +2293,34 @@ documentation by parsing them from their source and 
evaluating the
 parsed examples as part of your normal test run.  Integration is
 provided for the main Python test runners.")
     (license license:expat)))
+
+(define-public python-pytest-httpx
+  (package
+    (name "python-pytest-httpx")
+    (version "0.21.0")
+    (source
+     (origin
+       ;; pypi package doesn't include the tests
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Colin-b/pytest_httpx";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "12mcy1f5d5cq3rqrqgi2ar0qvzw62ibys17hw6dsdfd0j2syck4r"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (setenv "PYTHONPATH" (getcwd))
+               (invoke "pytest" "-vv")))))))
+    (propagated-inputs (list python-httpx))
+    (native-inputs (list python-pytest python-pytest-asyncio))
+    (home-page "https://colin-b.github.io/pytest_httpx/";)
+    (synopsis "Pytest plugin to mock httpx")
+    (description "This package provides a pytest fixture to mock httpx
+requests to be replied to with user provided responses.")
+    (license license:expat)))



reply via email to

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