diff options
author | Ludovic Courtès <ludo@gnu.org> | 2022-06-22 18:48:00 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-06-22 18:48:00 +0200 |
commit | 8655a714457dbf1cde45979507012d9515614028 (patch) | |
tree | 7712625328f45794ccda9baa730a4825bb2efb47 /gnu/packages/python-check.scm | |
parent | a589049e141588ebcf4079116e378d60b779f6b4 (diff) | |
parent | 2af3f5eef045f7d177cc394c89be069bac895688 (diff) | |
download | guix-8655a714457dbf1cde45979507012d9515614028.tar.gz |
Merge branch master into core-updates
Diffstat (limited to 'gnu/packages/python-check.scm')
-rw-r--r-- | gnu/packages/python-check.scm | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 7f9b027a30..c39b4e2ed1 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))) |