GNU bug report logs - #53179
[PATCH 0/3] Update httpx and add pytest-httpx.

Previous Next

Package: guix-patches;

Reported by: Vinicius Monego <monego <at> posteo.net>

Date: Tue, 11 Jan 2022 05:22:01 UTC

Severity: normal

Tags: patch

Done: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 53179 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: 53179 <at> debbugs.gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH v2 3/3] gnu: Add python-pytest-httpx.
Date: Fri, 14 Jan 2022 21:08:46 +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 181aa8b05c..8df1dd67eb 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -7,7 +7,7 @@
 ;;; Copyright © 2020 Julien Lepiller <julien <at> lepiller.eu>
 ;;; Copyright © 2020 Marius Bakke <mbakke <at> fastmail.com>
 ;;; Copyright © 2020 Edouard Klein <edk <at> beaver-labs.com>
-;;; Copyright © 2020, 2021 Vinicius Monego <monego <at> posteo.net>
+;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego <at> posteo.net>
 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy <at> bioneland.org>
 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 ;;; Copyright © 2021 Brendan Tildesley <mail <at> brendan.scot>
@@ -1789,6 +1789,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





This bug report was last modified 2 years and 337 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.