guix-patches
[Top][All Lists]
Advanced

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

[bug#53179] [PATCH 3/3] gnu: Add python-pytest-httpx.


From: Vinicius Monego
Subject: [bug#53179] [PATCH 3/3] gnu: Add python-pytest-httpx.
Date: Tue, 11 Jan 2022 05:24:29 +0000

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

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index b4e2765d72..da044b7acb 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -7,7 +7,7 @@
 ;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
-;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
 ;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
@@ -1735,6 +1735,38 @@ execution of a test suite.  It will also store a history 
of all test runs to
 help in debugging failures and optimizing the scheduler to improve speed.")
     (license license:asl2.0)))
 
+(define-public python-pytest-httpx
+  (package
+    (name "python-pytest-httpx")
+    (version "0.13.0")
+    (source
+     (origin
+       (method git-fetch)               ; no tests in PyPI release
+       (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 "0lh7df3ysxmjzvx6242xb6qiwpfxrnj70kjmw5sndvzmy5dfpxfc"))))
+    (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
+     (list python-httpx))
+    (native-inputs
+     (list python-pytest-asyncio python-pytest python-pytest-cov))
+    (home-page "https://colin-b.github.io/pytest_httpx/";)
+    (synopsis "Pytest fixture to mock HTTPX")
+    (description "This package provides a Pytest fixture that will make sure
+every @code{httpx} request will be replied to with user provided responses.")
+    (license license:expat)))
+
 ;; This is only used by python-sanic
 (define-public python-pytest-sanic
   (package
-- 
2.30.2






reply via email to

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