summaryrefslogtreecommitdiff
path: root/gnu/packages/python-check.scm
diff options
context:
space:
mode:
authorHartmut Goebel <h.goebel@crazy-compilers.com>2025-10-02 21:39:49 +0200
committerHartmut Goebel <h.goebel@crazy-compilers.com>2025-10-07 15:25:37 +0200
commitf0aefd0b5c1032927b4969a18047dd363cf8c831 (patch)
treed9af7a4961956b3b7d1b45f1b202833785f3dc0d /gnu/packages/python-check.scm
parent11ab410217fa094f040128917e90ea89ee586ffc (diff)
gnu: Add python-respx.
* gnu/packages/python-check.scm (python-respx): New variable. Change-Id: Iddfdcc6dd2cc0f518e7046ac8df743c4b535d639
Diffstat (limited to 'gnu/packages/python-check.scm')
-rw-r--r--gnu/packages/python-check.scm44
1 files changed, 43 insertions, 1 deletions
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 4a4815fd91a..913e1ab9e3c 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -9,7 +9,7 @@
;;; Copyright © 2018-2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019-2025 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019-2024 Maxim Cournoyer <maxim@guixotic.coop>
-;;; Copyright © 2019, 2021 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2019, 2021, 2025 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2020, 2022 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2020 Matthew James Kraai <kraai@ftbfs.org>
;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
@@ -3746,6 +3746,48 @@ libraries.")
simpler.")
(license license:expat)))
+(define-public python-respx
+ (package
+ (name "python-respx")
+ (version "0.22.0")
+ (source
+ (origin
+ ;; There are no tests in the PyPI tarball.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/lundberg/respx/")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0pl6vlyva837bnz3cy9mwmvvh8fq943rkrbq3mzj34bjf8swnw2g"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-pytest-config
+ (lambda _
+ ;; Drop test coverage requirements.
+ (substitute* "setup.cfg"
+ (("--cov(-[^ ]*)?=[^ ]*")
+ "\n")
+ (("--cov-fail-under [^ ]*")
+ "\n")))))))
+ (propagated-inputs (list python-httpx))
+ (native-inputs (list nss-certs-for-test
+ python-starlette
+ python-flask
+ python-pytest
+ python-pytest-asyncio
+ python-setuptools
+ python-wheel))
+ (home-page "https://lundberg.github.io/respx/")
+ (synopsis "Mocking for Python libraries HTTPX and HTTPCore")
+ (description
+ "This package provides a utility for mocking out the Python libraries HTTPX and
+HTTPCore.")
+ (license license:bsd-3)))
+
(define-public python-robber
(package
(name "python-robber")