summaryrefslogtreecommitdiff
path: root/gnu/packages/python-check.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python-check.scm')
-rw-r--r--gnu/packages/python-check.scm1499
1 files changed, 977 insertions, 522 deletions
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 66320312f7..92ea235550 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -1,12 +1,15 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015 Cyril Roelandt <tipecaml@gmail.com>
+;;; Copyright © 2015, 2017 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2015, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016-2022 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2016 宋文武 <iyzsong@envs.net>
;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
+;;; Copyright © 2017 Thomas Danckaert <thomas.danckaert@gmail.com>
+;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
;;; Copyright © 2018-2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019-2025 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2019-2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
-;;; Copyright © 2019, 2021 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2019-2024 Maxim Cournoyer <maxim@guixotic.coop>
+;;; 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>
@@ -23,6 +26,7 @@
;;; Copyright © 2022 Tomasz Jeneralczyk <tj@schwi.pl>
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; Copyright © 2023 John Kehayias <john.kehayias@protonmail.com>
+;;; Copyright © 2024 Danny Milosavljevic <dannym@friendly-machines.com>
;;; Copyright © 2024-2025 Troy Figiel <troy@troyfigiel.com>
;;; Copyright © 2024 Navid Afkhami <navid.afkhami@mdc-berlin.de>
;;; Copyright © 2024, 2025 David Elsing <david.elsing@posteo.net>
@@ -34,6 +38,7 @@
;;; Copyright © 2025 Matthew Elwin <elwin@northwestern.edu>
;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr>
;;; Copyright © 2025 Sergio Pastor Pérez <sergio.pastorperez@gmail.com>
+;;; Copyright © 2025 Zheng Junjie <z572@z572.online>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -55,12 +60,14 @@
#:use-module (gnu packages admin)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
- #:use-module (gnu packages certs)
+ #:use-module (gnu packages cmake)
+ #:use-module (gnu packages nss)
#:use-module (gnu packages check)
#:use-module (gnu packages django)
#:use-module (gnu packages jupyter)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
+ #:use-module (gnu packages ninja)
#:use-module (gnu packages openstack)
#:use-module (gnu packages perl)
#:use-module (gnu packages python-build)
@@ -77,6 +84,7 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
+ #:use-module (guix deprecation)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix git-download)
@@ -89,27 +97,30 @@
(version "0.7.2")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "aioresponses" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pnuckowski/aioresponses")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
- (base32 "16p8mdyfirddrsay62ji7rwcrqmmzxzf2isdbfm9cj5p338rbr42"))))
- (build-system python-build-system)
+ (base32 "0fcm1rl1h91c2ca446kl5r2q229a8cfad2xn9gmsmdvn29wm35kc"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke
- "pytest" "-vv" "tests" "-k"
- (string-append
- ;; These tests require network access.
- "not test_address_as_instance_of_url_combined_with_pass_through "
- "and not test_pass_through_with_origin_params"))))))))
- (native-inputs
- (list python-pbr python-ddt python-pytest))
- (propagated-inputs
- (list python-aiohttp python-setuptools))
+ (list
+ #:test-flags
+ #~(list
+ "tests" "-k"
+ (string-append
+ ;; These tests require network access.
+ "not test_address_as_instance_of_url_combined_with_pass_through "
+ "and not test_pass_through_with_origin_params"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'build 'set-pbr-version
+ (lambda _
+ (setenv "PBR_VERSION" #$version))))))
+ (native-inputs (list python-pbr python-ddt python-pytest python-setuptools))
+ (propagated-inputs (list python-aiohttp))
(home-page "https://github.com/pnuckowski/aioresponses")
(synopsis "Mock out requests made by ClientSession from aiohttp package")
(description
@@ -124,16 +135,17 @@ HTTP requests.")
(define-public python-allpairspy
(package
(name "python-allpairspy")
- (version "2.5.0")
+ (version "2.5.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "allpairspy" version))
(sha256
- (base32 "1c987h13dly9919d15w3h747rgn50ilnv7dginhlprxbj564hn4k"))))
- (build-system python-build-system)
+ (base32 "1zh983y9k5idna677vsjlfxlzm1dfff3w1n63sfi3vkfnnik37gn"))))
+ (build-system pyproject-build-system)
(native-inputs
- (list python-pytest python-pytest-runner))
+ (list python-pytest
+ python-setuptools))
(home-page "https://github.com/thombashi/allpairspy")
(synopsis "Pairwise test combinations generator")
(description
@@ -183,12 +195,15 @@ most situations.")
(version "1.1")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "assertpy" version))
+ (method git-fetch) ;no tests in PyPI distribution
+ (uri (git-reference
+ (url "https://github.com/assertpy/assertpy")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
- (base32 "0cs8xya465wvb9dw0kdl7cvkxwrslhbma66y44r1mmsajcll7imc"))))
+ (base32 "0hnfh45cmqyp7zasrllwf8gbq3mazqlhhk0sq1iqlh6fig0yfq2f"))))
(build-system pyproject-build-system)
- (native-inputs (list python-setuptools python-wheel))
+ (native-inputs (list python-pytest python-setuptools))
(home-page "https://github.com/assertpy/assertpy")
(synopsis "Simple assertion library for unit testing")
(description
@@ -221,6 +236,38 @@ the implementation of that name.")
(license (list license:asl2.0
license:lgpl3)))) ; only for setup_helpers.py
+(define-public python-autopep8
+ (package
+ (name "python-autopep8")
+ (version "2.3.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "autopep8" version))
+ (sha256
+ (base32 "0n0pjdk39n6vlddjqvbpkxd4a7q33dkf0k2yk6dbd5wijr7hli49"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs
+ (list python-pycodestyle python-tomli))
+ (native-inputs
+ (list python-setuptools))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'prepare-check
+ (lambda _
+ (setenv "HOME" "/tmp"))))))
+ (home-page "https://github.com/hhatto/autopep8")
+ (synopsis "Format Python code according to the PEP 8 style guide")
+ (description
+ "@code{autopep8} automatically formats Python code to conform to
+the PEP 8 style guide. It uses the pycodestyle utility to determine
+what parts of the code needs to be formatted. @code{autopep8} is
+capable of fixing most of the formatting issues that can be reported
+by pycodestyle.")
+ (license (license:non-copyleft
+ "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
+
(define-public python-avocado-framework
(package
(name "python-avocado-framework")
@@ -231,7 +278,7 @@ the implementation of that name.")
(uri (pypi-uri "avocado-framework" version))
(sha256
(base32 "0zhz6423p0b5gqx2mvg7dmq8m9gbsay7wqjdwzirlwcg2v3rcz0m"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
(list
;; The test suite hangs, due to a serious bug in Python/Avocado (see:
@@ -277,7 +324,8 @@ the implementation of that name.")
(setenv "HOME" "/tmp")
(setenv "PYTHONPATH" (getcwd))
(invoke "./selftests/check.py" "--skip" "static-checks")))))))
- (native-inputs (list bash-minimal coreutils-minimal perl sudo))
+ (native-inputs (list bash-minimal coreutils-minimal perl sudo
+ python-setuptools))
(inputs (list bash-minimal coreutils-minimal))
(home-page "https://avocado-framework.github.io/")
(synopsis "Tools and libraries to help with automated testing")
@@ -301,40 +349,21 @@ Avocado machine readable outputs this one is streamlined (per test results).
(define-public python-bandit
(package
(name "python-bandit")
- (version "1.8.3")
+ (version "1.8.6")
(source
(origin
(method url-fetch)
(uri (pypi-uri "bandit" version))
(sha256
- (base32 "0fhr0rsvh44ix31dwxjw8aj0wklj95368djwk0i98c2dcpmpp17m"))))
+ (base32 "0sz5lkg9anqz6ir157xr8ng9ymgj37ymbplkhl3w4qb9zhjrrznv"))))
(build-system pyproject-build-system)
(arguments
- (list
- #:test-flags
- ;; Two tets fail.
- #~(list "--exclude-regex" "test_no_arguments|test_help_arg")
- #:phases
- #~(modify-phases %standard-phases
- ;; TODO: Implement in pypproject-build-system's test-backends.
- (replace 'check
- (lambda* (#:key tests? test-flags #:allow-other-keys)
- (when tests?
- (apply invoke "stestr" "run" test-flags)))))))
+ (list #:tests? #f)) ;tests require complex setup and networking
(native-inputs
- (list python-beautifulsoup4
- python-fixtures
- python-setuptools
- python-stestr
- python-testscenarios
- python-testtools
- python-wheel))
+ (list python-setuptools))
(propagated-inputs
- (list python-gitpython
- python-jschema-to-python
- python-pyyaml
+ (list python-pyyaml
python-rich
- python-sarif-om
python-stevedore))
(home-page "https://github.com/PyCQA/bandit")
(synopsis "Security oriented static analyser for python code")
@@ -348,16 +377,16 @@ all the files it generates a report.")
(define-public python-beartype
(package
(name "python-beartype")
- (version "0.19.0")
+ (version "0.21.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "beartype" version))
(sha256
- (base32 "0wv598iv9c2s6ivfiara9pnkdlnas8xjw063wvyi0dswpb0xyhny"))))
+ (base32 "0i1j1mkcw0fgms9qg7j30nlgcr0b0ndx2l98sb162wp8bj7hg9gr"))))
(build-system pyproject-build-system)
(native-inputs
- (list python-hatchling python-numpy python-pygments python-pytest))
+ (list python-hatchling python-pytest))
(home-page "https://github.com/beartype/beartype")
(synopsis "Fast runtime type checking for Python")
(description "Beartype aims to be a very fast runtime type checking tool
@@ -369,28 +398,34 @@ written in pure Python.")
(name "python-codacy-coverage")
(version "1.3.11")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "codacy-coverage" version))
- (sha256
- (base32
- "1g0c0w56xdkmqb8slacyw5qhzrkp814ng3ddh2lkiij58y9m2imr"))))
- (build-system python-build-system)
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/codacy/python-codacy-coverage")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1cxq2c6wyzynqjvc5szyhwvzdz4g3a4dv6bx80w4k4d9p40699hv"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:tests? #f)); no tests
- (propagated-inputs
- (list python-check-manifest python-requests))
+ (list
+ ;; XXX: Pytest is unable to find tests, even with common tricks.
+ ;; TODO: Run tox.ini unittests after next python-team merge.
+ #:tests? #f))
+ (native-inputs (list python-setuptools python-wheel))
+ (propagated-inputs (list python-check-manifest python-requests))
(home-page "https://github.com/codacy/python-codacy-coverage")
(synopsis "Codacy coverage reporter for Python")
- (description "This package analyses Python test suites and reports how much
-of the code is covered by them. This tool is part of the Codacy suite for
-analysing code quality.")
+ (description
+ "This package analyses Python test suites and reports how much of the
+code is covered by them. This tool is part of the Codacy suite for analysing
+code quality.")
(license license:expat)))
(define-public python-covdefaults
(package
(name "python-covdefaults")
- (version "1.1.0")
+ (version "2.3.0")
(source
(origin
;; The PyPI tarball does not include tests.
@@ -400,16 +435,17 @@ analysing code quality.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "11a24c0wzv01n55fy4kdpnyqna4m9k0mp58kmhiaks34xw4k37hq"))))
- (build-system python-build-system)
+ (base32 "1b34zkn7g66iavjxdy8hg25ab56bafgsqizf6l1anszncayal6px"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda _
- (invoke "pytest" "-vv"))))))
+ ;; 88 passed, 1 deselected
+ ;; AttributeError: type object 'Plugins' has no attribute 'load_plugins'
+ (list #:test-flags #~(list "-k" "not test_coverage_init")))
(native-inputs
- (list python-coverage python-pytest))
+ (list python-pytest
+ python-setuptools))
+ (propagated-inputs
+ (list python-coverage))
(home-page "https://github.com/asottile/covdefaults")
(synopsis "Coverage plugin to provide opinionated default settings")
(description
@@ -421,12 +457,12 @@ analysing code quality.")
(package
(name "python-coveralls")
(version "4.0.1")
- (home-page "https://github.com/coveralls-clients/coveralls-python")
(source
(origin
- ;; The PyPI release lacks tests, so we pull from git instead.
- (method git-fetch)
- (uri (git-reference (url home-page) (commit version)))
+ (method git-fetch) ;no tests in PyPI archive
+ (uri (git-reference
+ (url "https://github.com/coveralls-clients/coveralls-python")
+ (commit version)))
(file-name (git-file-name name version))
(sha256
(base32 "1411h7rwxgp9ag26bmlpy7g7sdh39f56dc1mrd1n74bjsgvwzj6l"))))
@@ -438,10 +474,17 @@ analysing code quality.")
;; XXX: Unable to find coverage package.
"--ignore=tests/api/reporter_test.py"
"--ignore=tests/integration_test.py")))
- (propagated-inputs
- (list python-coverage python-docopt python-pyyaml python-requests))
(native-inputs
- (list poetry python-mock python-pytest python-responses))
+ (list python-poetry-core
+ python-mock
+ python-pytest
+ python-responses))
+ (propagated-inputs
+ (list python-coverage
+ python-docopt
+ python-pyyaml
+ python-requests))
+ (home-page "https://github.com/coveralls-clients/coveralls-python")
(synopsis "Show coverage stats online via coveralls.io")
(description
"Coveralls.io is a service for publishing code coverage statistics online.
@@ -600,6 +643,70 @@ counterexamples for you.")
@command{behave}.")
(license license:expat)))
+(define-public python-deal
+ (package
+ (name "python-deal")
+ (version "4.24.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "deal" version))
+ (sha256
+ (base32 "0a2b8s8fmacv56lhrqaif0rbgrmfp0b36m5bvhly89aj5d9qvac1"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ ;; tests: 668 passed, 194 skipped, 12 deselected
+ #:test-flags
+ ;; Network access is required
+ #~(list "--deselect=tests/test_imports.py::test_smoke_has"
+ #$@(map (lambda (test) (string-append "--deselect="
+ "tests/test_runtime/"
+ "test_offline.py::"
+ test))
+ (list "test_raises_exception"
+ "test_raises_specified_exception"
+ "test_allow_network"
+ "test_decorating_async_function"
+ "test_decorating_generator"))
+ ;; TypeError: MaxRetryError.__init__() missing 2 required
+ ;; positional arguments: 'pool' and 'url'
+ "--deselect=tests/test_runtime/test_pure.py::test_pure_offline"
+ ;; TypeError: MaxRetryError.__init__() missing 2 required
+ ;; positional arguments: 'pool' and 'url'
+ #$@(map (lambda (test) (string-append "--deselect="
+ "tests/test_runtime/"
+ "test_raises.py::"
+ test))
+ (list "test_raises_doesnt_override_another_contract"
+ "test_raises_doesnt_override_another_contract_async"
+ "test_raises_generator"))
+ ;; AttributeError: 'NoneType' object has no attribute
+ ;; 'TypeCheckError'
+ "--deselect=tests/test_testing.py::test_return_type_checks"
+ "--deselect=tests/test_testing.py::test_disable_type_checks")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-pytest-config
+ (lambda _
+ (substitute* "pyproject.toml"
+ ((".*--cov.*") "")))))))
+ (native-inputs
+ (list python-flit-core
+ python-pytest
+ python-docstring-parser
+ python-urllib3))
+ (home-page "https://github.com/life4/deal")
+ (synopsis "Design by contract for Python")
+ (description
+ "This package provides a Python library for
+@url{https://en.wikipedia.org/wiki/Design_by_contract, design by contract}
+(DbC) and checking values, exceptions, and side-effects. In a nutshell, deal
+implements functionality to write bug-free code. By adding a few decorators
+to the code, providing free tests, static analysis, formal verification, and
+much more.")
+ (license license:expat)))
+
(define-public python-ddt
(package
(name "python-ddt")
@@ -615,6 +722,7 @@ counterexamples for you.")
(list python-aiounittest
python-pytest
python-setuptools
+ python-six
python-wheel))
(propagated-inputs
(list python-pyyaml))
@@ -655,59 +763,79 @@ cases.")
text styles of documentation.")
(license license:asl2.0)))
+(define-public python-dpcontracts
+ (package
+ (name "python-dpcontracts")
+ (version "0.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "dpcontracts" version))
+ (sha256
+ (base32 "0ji38afb5kb52rrjhcqklqvabxxb1lbl32vr7d94iamy2qgxzybc"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:tests? #f)) ;no tests
+ (native-inputs (list python-setuptools))
+ (home-page "https://github.com/deadpixi/contracts")
+ (synopsis "Implementation of contracts for Python")
+ (description
+ "This package provides a simple implementation of contracts for Python.
+Contracts are a debugging and verification tool. They are declarative
+statements about what states a program must be in to be considered \"correct\"
+at runtime. They are similar to assertions, and are verified automatically at
+various well-defined points in the program. Contracts can be specified on
+functions and on classes.")
+ (license license:lgpl3+)))
+
(define-public python-eradicate
(package
(name "python-eradicate")
- (version "2.0.0")
+ (version "3.0.0")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "eradicate" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/myint/eradicate")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
- (base32
- "1j30g9jfmbfki383qxwrfds8b23yiwywj40lng4lqcf5yab4ahr7"))))
- (build-system python-build-system)
+ (base32 "135xywygriid1wvqkra13iccaayh5r6a233jyfrj6kizhflksy2p"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-pytest python-setuptools python-wheel))
(home-page "https://github.com/myint/eradicate")
(synopsis "Remove commented-out code from Python sources")
- (description "The @command{eradicate} command removes commented-out code
-from Python files. It does this by detecting block comments that contain
-valid Python syntax that are likely to be commented out code.")
+ (description
+ "The @command{eradicate} command removes commented-out code from Python
+files. It does this by detecting block comments that contain valid Python
+syntax that are likely to be commented out code.")
(license license:expat)))
(define-public python-expecttest
- (let ((commit "683b09a352cc426851adc2e3a9f46e0ab25e4dee")
- (revision "0"))
(package
(name "python-expecttest")
- (version (git-version "0.2.1" revision commit))
+ (version "0.3.0")
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/ezyang/expecttest")
- (commit commit)))
+ (url "https://github.com/pytorch/expecttest")
+ (commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "1djwxp9x1hczzxbimv1b1bmd083am88v27l82nmlkhvzyg2cmpvv"))))
+ "1diz07lbbdlypbmcikj646vr5fav4prgs68nmnlqi0fr7m01l4zw"))))
(build-system pyproject-build-system)
- (arguments
- (list
- #:phases
- #~(modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- ;; The test runs tests expected to fail, so the output is
- ;; confusing
- (invoke "python3" "test_expecttest.py")))))))
- (native-inputs (list python-hypothesis poetry))
- (home-page "https://github.com/ezyang/expecttest")
+ (native-inputs
+ (list python-hypothesis
+ python-poetry-core
+ ))
+ (home-page "https://github.com/pytorch/expecttest")
(synopsis "Python module for expect tests")
(description "@code{expecttest} is a Python module for expect tests, where
the initial expected value of a test can be automatically set by running the
test itself.")
- (license license:expat))))
+ (license license:expat)))
(define-public python-flake8-builtins
(package
@@ -734,6 +862,30 @@ test itself.")
being used as variables or parameters.")
(license license:gpl2)))
+(define-public python-flake8-class-newline
+ (package
+ (name "python-flake8-class-newline")
+ (version "1.6.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/AlexanderVanEck/flake8-class-newline")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "15fw0iw2c3a3n2aarfgq7147406489xd8nk0kkj9k2x98fkwwnyh"))))
+ (build-system pyproject-build-system)
+ (arguments (list #:test-backend #~'unittest))
+ (propagated-inputs (list python-flake8))
+ (native-inputs (list python-setuptools))
+ (home-page "https://github.com/AlexanderVanEck/flake8-class-newline")
+ (synopsis "Flake8 lint for newline after class definitions")
+ (description
+ "This package provides a flake8 extension to lint for newline after class
+definitions.")
+ (license license:expat)))
+
(define-public python-flake8-comprehensions
(package
(name "python-flake8-comprehensions")
@@ -790,6 +942,76 @@ list/set/dict comprehensions.")
providing hints about what deprecated methods should be replaced with.")
(license license:gpl2)))
+(define-public python-flake8-docstrings
+ (package
+ (name "python-flake8-docstrings")
+ (version "1.7.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pycqa/flake8-docstrings")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0a9cx11rz9asb4xkz7dg65kx8mpa74xqh5qp3lsiy74y4idwp9qi"))))
+ (build-system pyproject-build-system)
+ (arguments (list #:tests? #f)) ;there are no tests
+ (propagated-inputs (list python-flake8 python-pydocstyle))
+ (native-inputs (list python-setuptools))
+ (home-page "https://github.com/pycqa/flake8-docstrings")
+ (synopsis "Extension for flake8 which uses pydocstyle to check docstrings")
+ (description
+ "This package provides a extension for flake8 which uses pydocstyle to
+check docstrings.")
+ (license license:expat)))
+
+(define-public python-flake8-import-order
+ (package
+ (name "python-flake8-import-order")
+ (version "0.19.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "flake8_import_order" version))
+ (sha256
+ (base32 "1cmhpiaj9bgh64mg4y93hcbsifvqa2lriz3la0iy8cbn95akqfqk"))))
+ (build-system pyproject-build-system)
+ (native-inputs
+ (list python-setuptools
+ python-pytest
+ python-pylama))
+ (propagated-inputs
+ (list python-pycodestyle))
+ (home-page "https://github.com/PyCQA/flake8-import-order")
+ (synopsis
+ "Flake8 and pylama plugin that checks the ordering of import statements")
+ (description
+ "This package provieds a flake8 and pylama plugin that checks the ordering
+of import statements.")
+ (license license:lgpl3)))
+
+(define-public python-flexmock
+ (package
+ (name "python-flexmock")
+ (version "0.12.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "flexmock" version))
+ (sha256
+ (base32 "18dcr7mpldf3cxsqi9rak75n4z7x3j544l4ixdspairm7cf6cp23"))))
+ (build-system pyproject-build-system)
+ (native-inputs
+ (list python-poetry-core
+ python-pytest))
+ (home-page "https://flexmock.readthedocs.io/")
+ (synopsis "Testing library for Python")
+ (description
+ "flexmock is a testing library for Python that makes it easy to create
+mocks, stubs and fakes.")
+ (license license:bsd-3)))
+
(define-public python-gcovr
(package
(name "python-gcovr")
@@ -836,18 +1058,19 @@ Python.")
(build-system pyproject-build-system)
(arguments
(list
- #:test-flags #~(list "-vr" "green")
+ #:test-flags
+ #~(list "-tvvv"
+ "green.test.test_version"
+ "green.test.test_cmdline")
#:phases
#~(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key tests? test-flags #:allow-other-keys)
+ (lambda* (#:key tests? test-flags #:allow-other-keys)
(when tests?
- (apply invoke "python" "-m" "green" test-flags)))))))
+ (setenv "PATH" (string-append #$output "/bin:" (getenv "PATH")))
+ (apply invoke "green" test-flags)))))))
(native-inputs
- (list python-mypy
- python-setuptools
- python-testtools
- python-wheel))
+ (list python-setuptools))
(propagated-inputs
(list python-colorama
python-coverage
@@ -883,18 +1106,23 @@ Built-in integration with @url{http://nedbatchelder.com/code/coverage/, coverage
(version "1.1.1")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "hiro" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/alisaifee/hiro")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
- (base32 "0s2xz72i7kbm0l75vr04cqq2war74p3p376wm76999f93npkjcys"))))
+ (base32 "0j7z54nd72qfc065jgljqx53dhfkfz0922fk8qqczg7swmqf6cqv"))))
(build-system pyproject-build-system)
- (native-inputs (list python-setuptools python-wheel))
- (home-page "https://hiro.readthedocs.io/")
+ (native-inputs
+ (list python-pytest python-pytest-cov python-setuptools))
+ (home-page "https://hiro.readthedocs.io")
(synopsis "Time manipulation utilities for testing in Python")
- (description "Hiro provides context managers and utilities to either
-freeze, accelerate or decelerate and jump between different points in time.
-Functions exposed by the standard library’s @code{time}, @code{datetime} and
-@code{date} modules are patched within the contexts exposed.")
+ (description
+ "Hiro provides context managers and utilities to either freeze,
+accelerate or decelerate and jump between different points in time. Functions
+exposed by the standard library’s @code{time}, @code{datetime} and @code{date}
+modules are patched within the contexts exposed.")
(license license:expat)))
(define-public python-httmock
@@ -902,17 +1130,21 @@ Functions exposed by the standard library’s @code{time}, @code{datetime} and
(name "python-httmock")
(version "1.3.0")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "httmock" version))
- (sha256
- (base32
- "1zj1fcm0n6f0wr9mr0hmlqz9430fnr5cdwd5jkcvq9j44bnsrfz0"))))
- (build-system python-build-system)
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/patrys/httmock")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1dy7pjq4gz476jcnbbpzk8w8qxr9l8wwgw9x2c7lf6fzsgnf404q"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:tests? #f)); no tests
- (propagated-inputs
- (list python-requests))
+ (list
+ #:test-backend #~'custom
+ #:test-flags #~(list "tests.py")))
+ (native-inputs (list python-setuptools))
+ (propagated-inputs (list python-requests))
(home-page "https://github.com/patrys/httmock")
(synopsis "Mocking library for requests")
(description "This package provides a library for replying fake data to
@@ -922,38 +1154,34 @@ Python software under test, when they make an HTTP query.")
(define-public python-hypothesmith
(package
(name "python-hypothesmith")
- (version "0.2.0")
+ (version "0.3.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "hypothesmith" version))
(sha256
- (base32 "08kr9p6hjm3ys87k1k3l79cmf936qbhn21ab8zadsvnp0gyv7dqg"))))
+ (base32 "05hpr3iqqsrfvkzdn7wjxp92hjxmin3pch96fn4mvs68sq14ihcn"))))
(build-system pyproject-build-system)
(arguments
(list
#:test-flags
- #~(list "-k"
- (string-append
- ;; XXX: hypothesis.errors.Unsatisfiable
- "not test_source_code_from_libcst_node_type[MatchSingleton]"
- ;; XXX: Python/Black versions not as expected.
- " and not test_black_autoformatter_from_grammar"))
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'patch-lark-dependency
- (lambda _
- (substitute* "setup.py"
- (("lark-parser>=[0-9.]*") "lark")))))))
- (propagated-inputs
- (list python-hypothesis python-lark python-libcst-minimal))
+ #~(list "--numprocesses" (number->string (parallel-job-count))
+ "-k" (string-append
+ ;; XXX: hypothesis.errors.Unsatisfiable
+ "not test_source_code_from_libcst_node_type[MatchSingleton]"
+ ;; XXX: Python/Black versions not as expected.
+ " and not test_black_autoformatter_from_grammar"))))
(native-inputs
- (list python-black
+ (list python-black ;hard requirements to run tests
python-parso
python-pytest
python-pytest-cov
- python-setuptools
- python-wheel))
+ python-pytest-xdist
+ python-setuptools))
+ (propagated-inputs
+ (list python-hypothesis
+ python-lark
+ python-libcst-minimal))
(home-page "https://github.com/Zac-HD/hypothesmith")
(synopsis "Strategies for generating Python programs")
(description
@@ -967,11 +1195,10 @@ programs, something like CSmith, a random generator of C programs.")
(version "2.7.1")
(source
(origin
- ;; There are no tests in the PyPI tarball.
(method git-fetch)
(uri (git-reference
- (url "https://github.com/Parquery/icontract")
- (commit (string-append "v" version))))
+ (url "https://github.com/Parquery/icontract")
+ (commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1fix7wx899kn8vp9aa5m6q71la48gx3qqx4qd74535m61pb50r7f"))))
@@ -979,6 +1206,10 @@ programs, something like CSmith, a random generator of C programs.")
(list
#:phases
#~(modify-phases %standard-phases
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "setup.py"
+ (("asttokens>=2,<3") "asttokens"))))
(add-before 'check 'set-icontract-slow
(lambda _
;; Setting ICONTRACT_SLOW, does not enable a slow test suite.
@@ -987,13 +1218,15 @@ programs, something like CSmith, a random generator of C programs.")
(setenv "ICONTRACT_SLOW" "1"))))))
(build-system pyproject-build-system)
(native-inputs
- (list python-astor
- python-asyncstdlib
+ (list python-asyncstdlib
+ python-astor
+ python-deal
+ python-dpcontracts
python-mypy
python-numpy
+ python-pytest
python-setuptools
- python-typeguard
- python-wheel))
+ python-typeguard))
(propagated-inputs
(list python-asttokens
python-typing-extensions))
@@ -1010,45 +1243,38 @@ to establish class invariants.")
(define-public python-inline-snapshot
(package
(name "python-inline-snapshot")
- (version "0.18.2")
+ (version "0.29.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "inline_snapshot" version))
(sha256
- (base32 "09pqgz4phal2pjkv03wg3gvj7jr89rrb93rfw4hd2x9v8px4mqqv"))))
+ (base32 "19x5j97i96p3xr9xyjvwh0mmpcnypf8g5hf2jjm6g82ghsv3rrqp"))))
(build-system pyproject-build-system)
(arguments
(list
+ ;; tests: 518 passed, 88 skipped, 1 xfailed, 903 subtests passed
#:test-flags
- ;; Missing "freezer" fixture
- '(list "--ignore=tests/test_external.py"
- "--ignore=tests/test_pytest_plugin.py"
- "-k"
- (string-append
- "not test_trailing_comma"
- ;; Cannot use inline-snapshop when xdist is available.
- " and not test_xdist"
- " and not test_xdist_disabled"
- " and not test_xdist_and_disable"
- " and not test_typing"))))
- (propagated-inputs (list python-asttokens
- python-black
- python-click
- python-executing
- python-mkdocs
- python-rich
- python-tomli
- python-typing-extensions))
+ #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
+ ;; To prevent adding mypy and pyright.
+ "--ignore=tests/test_typing.py")))
(native-inputs
- (list python-dirty-equals
+ (list python-black ;XXX: used in tests/conftest.py to self lint
+ python-dirty-equals
python-freezegun
python-hatchling
- python-pydantic
- python-pytest
+ python-hypothesis
+ python-pydantic-2
+ python-pytest-bootstrap
+ python-pytest-freezer
python-pytest-mock
- python-pytest-subtests))
- (home-page "https://pypi.org/project/inline-snapshot/")
+ python-pytest-subtests
+ python-pytest-xdist))
+ (propagated-inputs
+ (list python-asttokens
+ python-executing
+ python-rich))
+ (home-page "https://github.com/15r10nk/inline-snapshot/")
(synopsis "Golden master/snapshot/approval testing library")
(description
"This package can be used for different things:
@@ -1085,16 +1311,9 @@ updating the value you want to compare with. The value is converted with
(sha256
(base32
"0b8kbjhk3j10rk0vcniy695m3h43yip6y93h1bd6jjh0cp7s09c7"))))
- (build-system python-build-system)
- (arguments
- `(#:phases (modify-phases %standard-phases
- (replace 'check
- (lambda _
- (invoke "pytest" "-vv"))))))
- (native-inputs
- (list python-pytest))
- (propagated-inputs
- (list python-six))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-pytest python-setuptools))
+ (propagated-inputs (list python-six))
(synopsis "Create JUnit XML test results")
(description
"This package provides a Python module for creating JUnit XML test
@@ -1228,18 +1447,10 @@ Python program.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32
- "0fg8jflcf4c929gd4zbcrk73d08waaqjfjmdjrgnv54mzl35pjxl"))))
- (build-system python-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "pytest")))))))
+ (base32 "0fg8jflcf4c929gd4zbcrk73d08waaqjfjmdjrgnv54mzl35pjxl"))))
+ (build-system pyproject-build-system)
(native-inputs
- (list python-numpy python-pytest))
+ (list python-numpy python-pytest python-setuptools python-wheel))
(home-page "https://github.com/kaste/mockito-python")
(synopsis "Mocking library for Python")
(description "This package provides a Python implementation of the Java
@@ -1247,24 +1458,25 @@ library of the same name. It eases monkey patching, for example to stub out
side effects when unit testing.")
(license license:expat)))
-
(define-public python-mypy
(package
(name "python-mypy")
- (version "1.13.0")
+ (version "1.16.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "mypy" version))
(sha256
(base32
- "0pl3plw815824z5gsncnjg3yn2v5wz0gqp20wdrncgmzdwdsd482"))))
+ "1avv8cj0qfhpw4s36bjhg994rml35fs4ndz78xg1r14l4050ml3b"))))
(build-system pyproject-build-system)
(arguments
(list
- ;; It tries to download hatchling and install aditional test
- ;; dependencies.
- #:test-flags #~(list "--ignore=mypy/test/testpep561.py")
+ #:test-flags
+ #~(list "--numprocesses" (number->string (parallel-job-count))
+ ;; It tries to download hatchling and install aditional test
+ ;; dependencies.
+ "--ignore=mypy/test/testpep561.py")
#:phases
#~(modify-phases %standard-phases
(add-before 'check 'set-home
@@ -1275,17 +1487,16 @@ side effects when unit testing.")
(setenv "HOME" "/tmp"))))))
(native-inputs
(list nss-certs-for-test
- python-attrs
python-lxml
python-psutil
python-pytest
- python-pytest-forked
python-pytest-xdist
python-setuptools
- python-virtualenv
+ python-types-setuptools
python-wheel))
(propagated-inputs
(list python-mypy-extensions
+ python-pathspec
python-tomli
python-typing-extensions))
(home-page "https://www.mypy-lang.org/")
@@ -1303,22 +1514,27 @@ them using any Python VM with basically no runtime overhead.")
(define-public python-mypy-extensions
(package
(name "python-mypy-extensions")
- (version "1.0.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "mypy_extensions" version))
- (sha256
- (base32
- "10h7mwjjfbwxzq7jzaj1pnv9g6laa1k0ckgw72j44160bnazinvm"))))
- (build-system python-build-system)
- (arguments
- `(#:tests? #f)) ;no tests
+ (version "1.1.0")
+ (source
+ (origin
+ (method git-fetch) ;no tests in PyPI archive
+ (uri (git-reference
+ (url "https://github.com/python/mypy_extensions")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "12a3qs6rckxljlgw8ylkgcgpwllz96rw82lrgmhlzdgqcnqhbl0w"))))
+ (build-system pyproject-build-system)
+ (arguments (list #:test-backend #~'unittest
+ #:test-flags #~(list "discover" "tests")))
+ (native-inputs
+ (list python-flit-core))
(home-page "https://github.com/python/mypy_extensions")
(synopsis "Experimental extensions for MyPy")
(description
- "The @code{python-mypy-extensions} module defines
-experimental extensions to the standard @code{typing} module that are
-supported by the MyPy typechecker.")
+ "The @code{python-mypy-extensions} module defines experimental extensions
+to the standard @code{typing} module that are supported by the MyPy
+typechecker.")
(license license:expat)))
;;; This variant exists to break a cycle between python-pylama and python-isort.
@@ -1584,37 +1800,47 @@ flake8 to check PEP-8 naming conventions.")
(version "1.2.0")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "pyannotate" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dropbox/pyannotate")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32
- "16bm0mf7wxvy0lgmcs1p8n1ji8pnvj1jvj8zk3am70dkp825iv84"))))
- (build-system python-build-system)
- (propagated-inputs
- (list python-mypy-extensions python-six))
- (home-page
- "https://github.com/dropbox/pyannotate")
+ (base32 "0gmhl4ldan0p774dhrs9a7bmjjphlsy3hhfqq84gak15rdjs59ga"))))
+ (build-system pyproject-build-system)
+ (arguments (list #:test-backend #~'unittest))
+ (native-inputs (list python-setuptools))
+ (propagated-inputs (list python-mypy-extensions python-six))
+ (home-page "https://github.com/dropbox/pyannotate")
(synopsis "Auto-generate PEP-484 annotations")
- (description "This package, PyAnnotate, is used to auto-generate PEP-484
-annotations.")
+ (description
+ "This package, PyAnnotate, is used to auto-generate PEP-484 annotations.")
(license license:asl2.0)))
(define-public python-pycotap
(package
(name "python-pycotap")
- (version "1.2.2")
+ (version "1.3.1")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "pycotap" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/remko/pycotap")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32 "1v69fxial9i5wlap6wc4igq3hydvxbak7dlgb7cikk8wjgafqf7r"))))
- (build-system python-build-system)
- (home-page "https://el-tramo.be/pycotap")
+ (base32 "1xw3mrrsw7wc8yas9p2hnzj2m3mw7p1qxkj6l942gidngqphyhar"))))
+ (build-system pyproject-build-system)
+ (arguments
+ ;; FIXME Unclear why tests fail.
+ (list #:tests? #f))
+ (native-inputs (list python-pytest python-setuptools))
+ (home-page "https://github.com/remko/pycotap")
(synopsis "Tiny Python TAP test runner")
- (description "This package provides a simple Python test runner for
-unittest that outputs Test Anything Protocol (TAP) results to standard
-output. Contrary to other TAP runners for Python, pycotap...
+ (description
+ "This package provides a simple Python test runner for unittest that
+outputs Test Anything Protocol (TAP) results to standard output. Contrary to
+other TAP runners for Python, pycotap...
@itemize
@item
prints TAP (and only TAP) to standard output instead of to a separate file,
@@ -1726,6 +1952,24 @@ wrapper above tools such as Pyflakes, pydocstyle, pycodestyle and McCabe,
among others.")
(license license:lgpl3+)))
+(define-public python-pynose
+ (package
+ (name "python-pynose")
+ (version "1.5.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pynose" version))
+ (sha256
+ (base32 "0jbzmxnxmgf60158gpvfsp8j2cid6psfwj3j94vxv61z8wk4xnl1"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-setuptools python-wheel))
+ (home-page "https://github.com/mdmintz/pynose")
+ (synopsis "pynose fixes nose to extend unittest and make testing easier")
+ (description
+ "pynose fixes nose to extend unittest and make testing easier.")
+ (license license:lgpl2.0)))
+
(define-public python-pytest-aiohttp
(package
(name "python-pytest-aiohttp")
@@ -1780,6 +2024,31 @@ data arrays produced during tests, in particular in cases where the arrays
are too large to conveniently hard-code them in the tests.")
(license license:bsd-3)))
+(define-public python-pytest-asdf-plugin
+ (package
+ (name "python-pytest-asdf-plugin")
+ (version "0.1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest_asdf_plugin" version))
+ (sha256
+ (base32 "0bcfl1s7yrnr2rlpr3hswcg9jyq6gnj0ppmpzppw9xgj796ycfb5"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:tests? #f ;to avoid import astronomy module
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'sanity-check))))
+ (native-inputs
+ (list python-setuptools
+ python-setuptools-scm))
+ (home-page "https://github.com/asdf-format/pytest-asdf-plugin")
+ (synopsis "Pytest plugin for testing ASDF schemas")
+ (description
+ "This package provides a Pytest plugin for testing ASDF schemas.")
+ (license license:bsd-3)))
+
(define-public python-pytest-astropy
(package
(name "python-pytest-astropy")
@@ -1821,9 +2090,12 @@ astropy related packages.")
(uri (pypi-uri "pytest-astropy-header" version))
(sha256
(base32 "046v4arinv8b5jz05pvhnc0n1aqqndwvhlsl635ahxabr40i32bp"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(native-inputs
- (list python-pytest python-setuptools-scm))
+ (list python-numpy
+ python-pytest
+ python-setuptools
+ python-setuptools-scm))
(home-page "https://www.astropy.org/")
(synopsis
"Pytest plugin adding diagnostic data to the header of the test output")
@@ -1837,21 +2109,21 @@ Astropy project, but is optimized for use with astropy-related projects.")
(define-public python-pytest-benchmark
(package
(name "python-pytest-benchmark")
- (version "4.0.0")
+ (version "5.1.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-benchmark" version))
(sha256
(base32
- "1la802m5r49y1zqilmhqh0qvbnz139lw0qb3jmm9lngy7sw8a1zv"))))
- (build-system python-build-system)
+ "01d1mk951ldkw589z7f0w8c22sp5341hphflghgj7s4jqb6n39ly"))))
+ (build-system pyproject-build-system)
(arguments
- '(#:test-target "check"))
+ (list #:tests? #f)) ;XXX: cycles with python-nbmake
(propagated-inputs
(list python-py-cpuinfo))
(native-inputs
- (list python-pytest))
+ (list python-pytest-bootstrap python-setuptools))
(home-page "https://github.com/ionelmc/pytest-benchmark")
(synopsis "Pytest fixture for benchmarking code")
(description
@@ -1930,21 +2202,32 @@ failures per test.")
(define-public python-pytest-checkdocs
(package
(name "python-pytest-checkdocs")
- (version "2.7.1")
+ (version "2.10.0") ;PyPI contains only the latest version
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "pytest-checkdocs" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jaraco/pytest-checkdocs")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32 "1bn1wr3yz8avkwacffyh26za7mg20f9pajpakfk4cn7yvmgbhcrb"))))
- (build-system python-build-system)
- (arguments (list #:tests? #f)) ;no tests in pypi archive
+ (base32 "1amw07skzfwy88dqvcsh308lcds7avyyja0qzdqrk4739cm1g0vh"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:tests? #f ;tests require network access
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'build 'set-version
+ (lambda _
+ (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))))))
+ (native-inputs
+ (list python-pytest-bootstrap
+ python-setuptools-scm
+ python-wheel))
(propagated-inputs
(list python-docutils
- python-importlib-metadata
- python-pep517
- python-pytest))
- (native-inputs (list python-setuptools-scm))
+ python-pypa-build))
(home-page "https://github.com/jaraco/pytest-checkdocs")
(synopsis "Check the README when running tests")
(description
@@ -1958,46 +2241,47 @@ of the project to ensure it renders properly.")
(version "1.0.2")
(source
(origin
- (method url-fetch)
- (uri
- (pypi-uri "pytest_click" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Stranger6667/pytest-click")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32 "1rcv4m850rl7djzdgzz2zhjd8g5ih8w6l0sj2f9hsynymlsq82xl"))))
- (build-system python-build-system)
- (propagated-inputs
- (list python-click python-pytest))
+ (base32 "197nvlqlyfrqpy5lrkmfh1ywpr6j9zipxl9d7syg2a2n7jz3a8rj"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-setuptools python-wheel))
+ (propagated-inputs (list python-click python-pytest))
(home-page "https://github.com/Stranger6667/pytest-click")
- (synopsis "Py.test plugin for Click")
- (description "This package provides a plugin to test Python click
-interfaces with pytest.")
+ (synopsis "Pytest plugin for Click")
+ (description
+ "This package provides a plugin to test Python click interfaces with
+pytest.")
(license license:expat)))
(define-public python-pytest-console-scripts
(package
(name "python-pytest-console-scripts")
- (version "1.2.1")
+ (version "1.4.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-console-scripts" version))
(sha256
- (base32
- "1qsw3i2h3psyi5avwf14panx8wxqfik2z7294dy37w8ha415iwn7"))))
- (build-system python-build-system)
+ (base32 "15d8yi6g9wd7g6gkzhp0m3fpnbvnglfkhi4yxc1a5by09kc6x0js"))))
+ (build-system pyproject-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 "pytest" "--verbose"
- ;; This one test fails because of PATH assumptions
- "-k" "not test_elsewhere_in_the_path")))))))
- (propagated-inputs
- (list python-mock python-pytest))
+ (list
+ #:test-flags
+ #~(list "-k" (string-join
+ ;; FileNotFoundError: [Errno 2] No such file or directory:
+ ;; 'script.py'
+ (list "not test_elsewhere_in_the_path"
+ "test_shell"
+ "test_run_path")
+ " and not "))))
(native-inputs
- (list python-setuptools-scm))
+ (list python-pytest-bootstrap
+ python-setuptools))
(home-page "https://github.com/kvas-it/pytest-console-scripts")
(synopsis "Pytest plugin for testing console scripts")
(description
@@ -2029,26 +2313,6 @@ your template is working as expected and takes care of cleaning up after
running the tests.")
(license license:expat)))
-(define-public python-pytest-cram
- (package
- (name "python-pytest-cram")
- (version "0.2.2")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "pytest-cram" version))
- (sha256
- (base32
- "0405ymmrsv6ii2qhq35nxfjkb402sdb6d13xnk53jql3ybgmiqq0"))))
- (build-system python-build-system)
- (propagated-inputs (list python-cram python-pytest))
- (home-page "https://github.com/tbekolay/pytest-cram")
- (synopsis "Run cram tests with pytest")
- (description "Cram tests command line applications; Pytest tests Python
-applications. @code{pytest-cram} tests Python command line applications by
-letting you write your Python API tests with pytest, and your command line
-tests in cram.")
- (license license:expat)))
-
(define-public python-pytest-csv
(package
(name "python-pytest-csv")
@@ -2092,20 +2356,9 @@ it adds to the Pytest command line interface (CLI).")
(build-system pyproject-build-system)
(arguments
(list
- #:test-flags
- #~(list "tests"
- ;; FIXME: Failed: nomatch: '*sqr*PASSED*
- "-k" (string-append
- "not test_wrap_cpp_ext_module[importlib]"
- " and not test_wrap_c_ext_module[importlib]"
- " and not test_cython_ext_module[importlib]"))
- #:phases
- #~(modify-phases %standard-phases
- (add-before 'check 'build-extensions
- (lambda _
- (with-directory-excursion "tests/example-project"
- (invoke "python" "setup.py" "build_ext" "--inplace")))))))
- (native-inputs (list python-cython-3 python-setuptools python-wheel))
+ ;; E ModuleNotFoundError: No module named 'setuptools.sandbox'
+ #:tests? #f)) ;XXX: tests are broken
+ (native-inputs (list python-cython python-setuptools python-wheel))
(propagated-inputs (list python-pytest))
(home-page "https://github.com/lgpage/pytest-cython")
(synopsis "Cython extension modules testing plugin")
@@ -2142,25 +2395,29 @@ files and/or directories.")
(version "1.0.0")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "pytest-doctest-custom" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/danilobellini/pytest-doctest-custom")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32 "0kxkdd6q9c3h31kc88lbyfll4c45b0zjd24cbr4c083fcvcy7lip"))))
- (build-system python-build-system)
+ (base32 "0hpdfazzvpgyhfr5la9n8k7a1j3z2nvqp76wiyzr73ha5wij33zl"))))
+ (build-system pyproject-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" "test_pytest_doctest_custom.py")))))))
- (native-inputs
- (list python-pytest))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "test_pytest_doctest_custom.py")))))))
+ (native-inputs (list python-pytest python-setuptools python-wheel))
(home-page "https://github.com/danilobellini/pytest-doctest-custom")
(synopsis
"Pytest plugin to customize string representations of doctest results")
- (description "This package provides a Pytest plugin for customizing string
+ (description
+ "This package provides a Pytest plugin for customizing string
representations of doctest results. It can change the display hook used by
doctest to render the object representations.")
(license license:expat)))
@@ -2214,16 +2471,18 @@ advanced doctest support and enables the testing of reStructuredText files.")
(define-public python-pytest-env
(package
(name "python-pytest-env")
- (version "0.6.2")
+ (version "1.1.5")
(source
(origin
(method url-fetch)
- (uri (pypi-uri "pytest-env" version))
+ (uri (pypi-uri "pytest_env" version))
(sha256
- (base32 "1hl0ln0cicdid4qjk7mv90lw9xkb0v71dlj7q7rn89vzxxm9b53y"))))
- (build-system python-build-system)
+ (base32 "1ky11hgb00wdz3mrsfk6zp17r56j99allimcfd83hhqfm909h84i"))))
+ (build-system pyproject-build-system)
(native-inputs
- (list python-pytest))
+ (list python-hatch-vcs
+ python-hatchling
+ python-pytest))
(home-page "https://github.com/MobileDynasty/pytest-env")
(synopsis "Pytest plugin that allows you to add environment variables")
(description
@@ -2258,19 +2517,23 @@ sub-package.")
(license license:bsd-3)))
(define-public python-pytest-fixture-config
+ ;; TODO: Master branch has removed all Python 2 support such Six, consider
+ ;; to update and drop python-six from closure in the next update cyle.
(package
(name "python-pytest-fixture-config")
- (version "1.7.0")
+ (version "1.8.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-fixture-config" version))
(sha256
(base32
- "13i1qpz22w3x4dmw8vih5jdnbqfqvl7jiqs0dg764s0zf8bp98a1"))))
- (build-system python-build-system)
+ "03hvviv0a4y0r8pdnj5s3hdbr2d3k9cx0ipjafxbsl88w9gqjff7"))))
+ (build-system pyproject-build-system)
(native-inputs
- (list python-pytest python-setuptools-git))
+ (list python-pytest-bootstrap
+ python-setuptools
+ python-six))
(home-page "https://github.com/manahl/pytest-plugins")
(synopsis "Fixture configuration utils for py.test")
(description
@@ -2401,31 +2664,65 @@ times and detect flakyness.")
(version "2021.3.24")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "pytest-helpers-namespace" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/saltstack/pytest-helpers-namespace")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32
- "0pyj2d45zagmzlajzqdnkw5yz8k49pkihbydsqkzm413qnkzb38q"))))
- (build-system python-build-system)
+ (base32 "0ikwiwp9ycgg7px78nxdkqvg7j97krb6vzqlb8fq8fvbwrj4q4v2"))))
+ (build-system pyproject-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; Make the installed plugin discoverable by Pytest.
- (add-installed-pythonpath inputs outputs)
- (invoke "pytest" "-vv"))))))
- (native-inputs
- (list python-pytest python-setuptools ; needs setuptools >= 50.3.2
- python-setuptools-scm python-setuptools-declarative-requirements))
+ (add-after 'unpack 'set-version
+ (lambda _
+ (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))))))
+ (native-inputs (list python-pytest python-setuptools python-setuptools-scm
+ python-setuptools-declarative-requirements
+ python-wheel))
(home-page "https://github.com/saltstack/pytest-helpers-namespace")
(synopsis "Pytest Helpers Namespace Plugin")
- (description "Pytest Helpers Namespace Plugin provides a helpers pytest
-namespace which can be used to register helper functions without requiring
-someone to import them in their actual tests to use them.")
+ (description
+ "Pytest Helpers Namespace Plugin provides a helpers pytest namespace
+which can be used to register helper functions without requiring someone to
+import them in their actual tests to use them.")
(license license:asl2.0)))
+(define-public python-pytest-home
+ (package
+ (name "python-pytest-home")
+ (version "0.6.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jaraco/pytest-home")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "151xx48dahbh7yx2a9cr9f2iy2i6f7s3zsm4zn5apvgl9qmjhkk7"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-version
+ (lambda _
+ (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))))))
+ (propagated-inputs (list python-pytest))
+ (native-inputs
+ (list git-minimal
+ python-pytest
+ python-setuptools
+ python-setuptools-scm))
+ (home-page "https://github.com/jaraco/pytest-home")
+ (synopsis "Home directory fixtures")
+ (description
+ "This package provides home directory fixtures for pytest.")
+ (license license:expat)))
+
(define-public python-pytest-html
(package
(name "python-pytest-html")
@@ -2495,16 +2792,17 @@ requests to be replied to with user provided responses.")
(version "3.1.0")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "pytest_isort" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/stephrdev/pytest-isort")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
- (base32 "0v0qa5l22y3v0nfkpvghbinzyj2rh4f54k871lrp992lbvf02y06"))))
- (build-system python-build-system)
- (arguments
- `(#:tests? #f)) ; No tests in PyPi tarball.
- (propagated-inputs
- (list python-isort python-pytest))
- (home-page "https://github.com/moccu/pytest-isort/")
+ (base32 "07hj2z2jsshk0m60j0w10q3yzis69714k7qbw2f0cprc5li9b06n"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-isort python-pytest))
+ (native-inputs (list python-poetry-core))
+ (home-page "https://github.com/stephrdev/pytest-isort")
(synopsis "Pytest plugin to check import ordering using isort")
(description
"This package provides a pytest plugin to check import ordering using
@@ -2702,28 +3000,25 @@ of tests run in a specific order.")
(package
(name "python-pytest-parawtf")
(version "1.0.2")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "pytest-parawtf" version))
- (sha256
- (base32
- "08s86hy58lvrd90cnayzydvac4slaflj0ph9yknakcc42anrm023"))))
- (build-system python-build-system)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest-parawtf" version))
+ (sha256
+ (base32 "08s86hy58lvrd90cnayzydvac4slaflj0ph9yknakcc42anrm023"))))
+ (build-system pyproject-build-system)
(arguments
(list
- #:phases
- #~(modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- ;; https://github.com/flub/pytest-parawtf/issues/1
- (invoke "pytest" "-k" "not test_mark")))))))
+ #:test-flags
+ ;; https://github.com/flub/pytest-parawtf/issues/1
+ #~(list "-k" "not test_mark")))
+ (native-inputs (list python-pytest python-setuptools python-wheel))
(propagated-inputs (list python-pytest))
(home-page "https://github.com/flub/pytest-parawtf/")
(synopsis "Finally spell paramete?ri[sz]e correctly")
(description
-"@code{python-pytest} uses one of four different spellings of
-parametrize. This plugin allows you to use all four.")
+ "Pytest uses one of four different spellings of parametrize. This plugin
+allows you to use all four.")
(license license:expat)))
(define-public python-pytest-pycodestyle
@@ -2755,7 +3050,7 @@ for the @code{pytest} framework.")
(define-public python-pytest-pydocstyle
(package
(name "python-pytest-pydocstyle")
- (version "2.2.0")
+ (version "2.4.0")
(source
(origin
(method git-fetch)
@@ -2764,17 +3059,23 @@ for the @code{pytest} framework.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0w6fivz4nb4b70wzmi5sk17qs9pd05rnh03fmch6v00r3dmfpk39"))))
- (build-system python-build-system)
+ (base32 "08jaz92pzq6lqg64jbl9f6j0gdb622wl0qb2llfcy82grx2vv09q"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:tests? #f)) ; test requires the package itself
- (propagated-inputs
- (list python-pydocstyle
- python-pytest)) ;apparently required
+ (list
+ ;; XXX: pytest failed to import 'py.io', while python can.
+ #:tests? #f))
+ (native-inputs
+ (list python-pytest
+ python-pytest-isort
+ python-pytest-pycodestyle
+ python-setuptools
+ python-wheel))
+ (propagated-inputs (list python-pydocstyle python-pytest)) ;apparently required
(home-page "https://github.com/henry0312/pytest-pydocstyle")
(synopsis "Pytest plugin to run @command{pydocstyle}")
- (description "This package provides a Pytest plugin to run
-@command{pydocstyle}.")
+ (description
+ "This package provides a Pytest plugin to run @command{pydocstyle}.")
(license license:expat)))
(define-public python-pytest-pylint
@@ -2838,6 +3139,32 @@ The main usage is to use the @code{qtbot} fixture, responsible for handling
interaction, like key presses and mouse clicks.")
(license license:expat)))
+(define-public python-pytest-recording
+ (package
+ (name "python-pytest-recording")
+ (version "0.13.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest_recording" version))
+ (sha256
+ (base32 "133nj8vha63gv226f0gvqn16gnazbn2rqh8amv2fx4jrm2r693an"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:tests? #f)) ;XXX: more than 50% tets failed
+ (native-inputs
+ (list python-pytest-bootstrap
+ python-hatchling))
+ (propagated-inputs
+ (list python-vcrpy))
+ (home-page "https://github.com/kiwicom/pytest-recording")
+ (synopsis "Pytest support for recording and replaying HTTP traffic")
+ (description
+ "This package provides a Pytest plugin powered by
+@url{https://vcrpy.readthedocs.io/en/latest/, VCR.py} to record and replay
+HTTP traffic.")
+ (license license:expat)))
+
(define-public python-pytest-remotedata
(package
(name "python-pytest-remotedata")
@@ -2908,31 +3235,45 @@ times.")
(define-public python-pytest-rerunfailures
(package
(name "python-pytest-rerunfailures")
- (version "10.2")
+ (version "15.1")
(source
(origin
(method url-fetch)
- (uri (pypi-uri "pytest-rerunfailures" version))
+ (uri (pypi-uri "pytest_rerunfailures" version))
(sha256
- (base32 "15v68kggjvkflbqr0vz8gp5yp3pcsk0rz05bpg2l4xp0a6nin7ly"))))
- (build-system python-build-system)
- (propagated-inputs (list python-pytest python-setuptools))
+ (base32 "106fiqn3d86xcl2cwmc76svi2mkfgphqna37bf617f6pmdl06166"))))
+ (build-system pyproject-build-system)
+ (native-inputs
+ (list python-pytest-bootstrap
+ python-setuptools))
+ (propagated-inputs
+ (list python-packaging))
(home-page "https://github.com/pytest-dev/pytest-rerunfailures")
(synopsis "Pytest plugin to re-run flaky tests")
(description "This package provides a pytest plugin to re-run tests to
eliminate flaky failures.")
(license license:mpl2.0)))
-(define-public python-pytest-rerunfailures-13
+(define-public python-pytest-retry
(package
- (inherit python-pytest-rerunfailures)
- (version "13.0")
+ (name "python-pytest-retry")
+ (version "1.7.0")
(source
(origin
(method url-fetch)
- (uri (pypi-uri "pytest-rerunfailures" version))
+ (uri (pypi-uri "pytest_retry" version))
(sha256
- (base32 "16cin0chv59w4rvnd6r0fisp0s8avmp07rwn9da6yixw43jdncp1"))))))
+ (base32 "03zqgl2y16pcf0w0sn7z9n1gaqmkspl9xfhigks9v50yy0wj7mgq"))))
+ (build-system pyproject-build-system)
+ (native-inputs
+ (list python-pytest-bootstrap
+ python-setuptools))
+ (home-page "https://github.com/str0zzapreti/pytest-retry")
+ (synopsis "Pytest plugin to retry flaky tests in CI environments")
+ (description
+ "This package provides a plugin for Pytest which adds the ability to retry
+flaky tests, thereby improving the consistency of the test suite results.")
+ (license license:expat)))
;; This is only used by python-sanic
(define-public python-pytest-sanic
@@ -2973,18 +3314,20 @@ you to test your code asynchronously.")
(name "python-pytest-services")
(version "1.3.1")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "pytest-services" version))
- (sha256
- (base32
- "0b2zfv04w6m3gp2v44ifdhx22vcji069qnn95ry3zcyxib7cjnq3"))))
- (build-system python-build-system)
- (arguments '(#:tests? #f)) ; Tests not included in release tarball.
- (propagated-inputs
- (list python-psutil python-requests))
- (native-inputs
- (list python-pytest))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pytest-dev/pytest-services")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "123s2vd3h5knfs6lz7b83z0wl2miqsbya3w71cm8xk6hgyb10nmv"))))
+ (build-system pyproject-build-system)
+ (arguments
+ ;; XXX: Tests require running memcached, mysql and X servers.
+ (list #:tests? #f))
+ (propagated-inputs (list python-psutil python-requests))
+ (native-inputs (list python-pytest python-setuptools python-wheel))
(home-page "https://github.com/pytest-dev/pytest-services")
(synopsis "Services plugin for pytest testing framework")
(description
@@ -3157,6 +3500,17 @@ through Python's socket interface")
(base32
"1yb5y6dqzf6k5a07yzdpw8w50bm7zbsdvv06ii7c7vyg9wx5iw6y"))))
(build-system pyproject-build-system)
+ (arguments
+ (list
+ ;; 134 passed, 4 skipped, 4 deselected
+ #:test-flags
+ ;; XXX: Skip tests fixed on master in
+ ;; be30d9a94ba45afb600717e3fcd95b8b2ff2c60e commit, not critical,
+ ;; re-chech in the next refresh cycle.
+ #~(list "--deselect=tests/test_examples.py::test_documentation[README.rst]"
+ "--deselect=tests/test_examples.py::test_documentation[docs/index.rst]"
+ "--deselect=tests/test_subprocess.py::test_text[False]"
+ "--deselect=tests/test_subprocess.py::test_universal_newlines[False]")))
(native-inputs
(list python-anyio
python-docutils
@@ -3164,8 +3518,7 @@ through Python's socket interface")
python-pytest
python-pytest-asyncio
python-pytest-rerunfailures
- python-setuptools
- python-wheel))
+ python-setuptools))
(home-page "https://github.com/aklajnert/pytest-subprocess")
(synopsis "Fake subprocess for Pytest")
(description
@@ -3175,23 +3528,21 @@ through Python's socket interface")
(define-public python-pytest-subtests
(package
(name "python-pytest-subtests")
- (version "0.10.0")
+ (version "0.14.2")
(source
(origin
(method url-fetch)
- (uri (pypi-uri "pytest-subtests" version))
+ (uri (pypi-uri "pytest_subtests" version))
(sha256
- (base32 "05zvnxx0hdrd9w4z51qhchg3nkz5s47agryw68g8q7krq5kim5nr"))))
- (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")))))))
- (native-inputs (list python-pytest python-setuptools-scm))
+ (base32 "1ph0z3a0lywzfw7illl3khydqffi8im2203dlxqfwa6mbxkahm3i"))))
+ (build-system pyproject-build-system)
+ (native-inputs
+ (list python-pytest-bootstrap
+ python-setuptools
+ python-setuptools-scm
+ python-wheel))
+ (propagated-inputs
+ (list python-attrs))
(home-page "https://github.com/pytest-dev/pytest-subtests")
(synopsis "Unittest subTest() support and subtests fixture")
(description "This Pytest plugin provides unittest @code{subTest()}
@@ -3399,31 +3750,21 @@ friendly library for concurrency and async I/O in Python.")
(name "python-pytest-vcr")
(version (git-version "1.0.2" revision commit))
(source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/ktosiek/pytest-vcr")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1yk988zi0la6zpcm3fff0mxf942di2jiymrfqas19nyngj5ygaqs"))))
- (build-system python-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (invoke "pytest" "tests/"))))))
- (native-inputs
- (list python-urllib3))
- (propagated-inputs
- (list python-pytest python-vcrpy))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ktosiek/pytest-vcr")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1yk988zi0la6zpcm3fff0mxf942di2jiymrfqas19nyngj5ygaqs"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-urllib3 python-setuptools python-wheel))
+ (propagated-inputs (list python-pytest python-vcrpy))
(home-page "https://github.com/ktosiek/pytest-vcr")
(synopsis "Plugin for managing VCR.py cassettes")
(description
- "Plugin for managing VCR.py cassettes.")
+ "This package is a pytest plugin for managing VCR.py cassettes.")
(license license:expat))))
(define-public python-pytest-virtualenv
@@ -3538,15 +3879,9 @@ libraries.")
(file-name (git-file-name name version))
(sha256
(base32 "1rssq4wpqmx1c17hjfx5l3sn3zmnlz9jffddiqrs4f6h7m6cadai"))))
- (build-system python-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda _
- (invoke "pytest" "-vv"))))))
+ (build-system pyproject-build-system)
(native-inputs
- (list python-covdefaults python-coverage python-pytest))
+ (list python-pytest python-setuptools))
(propagated-inputs
(list python-regex))
(home-page "https://github.com/asottile/re-assert")
@@ -3556,23 +3891,66 @@ 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")
(version "1.1.5")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "robber" version))
- (sha256
- (base32
- "0xp5csgv2g9q38hscml6bc5i1nm4xy5lzqqiimm2drxsf0hw2nq5"))))
- (build-system python-build-system)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "robber" version))
+ (sha256
+ (base32 "0xp5csgv2g9q38hscml6bc5i1nm4xy5lzqqiimm2drxsf0hw2nq5"))))
+ (build-system pyproject-build-system)
;; There are no tests in the tarball downloaded from PyPI.
;; The last version tagged in Github (0.1.0) is older than the one on PyPI.
;; Reported upstream: <https://github.com/vesln/robber.py/issues/20>.
- (arguments '(#:tests? #f))
- (propagated-inputs
- (list python-mock python-termcolor))
+ (arguments
+ '(#:tests? #f))
+ (native-inputs (list python-setuptools python-wheel))
+ (propagated-inputs (list python-mock python-termcolor))
;; URL of the fork used to generate the package available on PyPI.
(home-page "https://github.com/EastAgile/robber.py")
(synopsis "Test-driven development (TDD) assertion library for Python")
@@ -3701,21 +4079,23 @@ possibly work.")
(arguments
(list
#:test-flags
- #~(list "--test-path" "stestr/tests")
+ #~(list "--test-path" "stestr/tests"
+ "--exclude-regex" (string-join
+ (list "test_pass"
+ "test_pass_list"
+ "test_unexpected_pass"
+ "test_load_from_stdin_quiet"
+ "test_trace_with_all_skips")
+ "|"))
#:phases
#~(modify-phases %standard-phases
(add-before 'check 'configure-check
(lambda _
- (setenv "HOME" (getcwd))))
- (replace 'check
- (lambda* (#:key tests? test-flags #:allow-other-keys)
- (when tests?
- (let ((stestr (string-append #$output "/bin/stestr")))
- (apply invoke stestr "run" test-flags))))))))
+ (setenv "HOME" (getcwd)))))))
(native-inputs
(list python-ddt
python-iso8601
- python-flit-core-next ;requires >=3.12
+ python-flit-core
python-setuptools))
(propagated-inputs
(list python-cliff-bootstrap
@@ -3841,15 +4221,17 @@ immutability of computed results.")
(define-public python-tappy
(package
(name "python-tappy")
- (version "3.0")
+ (version "3.2.1")
(source
(origin
(method url-fetch)
- (uri (pypi-uri "tap.py" version))
+ (uri (pypi-uri "tap_py" version))
(sha256
- (base32
- "0w4w6pqjkv54j7rv6vdrpfxa72c5516bnlhpcqr3vrb4zpmyxvpm"))))
- (build-system python-build-system)
+ (base32 "026n47b46z07yh5z5vpffcfq2xp6850g2s8w9ycssvx5y1m9wg6h"))))
+ (build-system pyproject-build-system)
+ (arguments (list #:test-backend #~'custom
+ #:test-flags #~(list "tests/run.py")))
+ (native-inputs (list python-hatchling))
(home-page "https://github.com/python-tap/tappy")
(synopsis "Tools for Test Anything Protocol")
(description "Tappy is a set of tools for working with the Test Anything
@@ -3867,7 +4249,10 @@ data in a standard way.")
(uri (pypi-uri "test-utils" version))
(sha256
(base32 "0cs0gyihnkj8ya4yg3ld3ly73mpxrkn2gq9acamclhqvhxsv7zd6"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:tests? #f)) ; No tests, neither on pypi nor upstream.
+ (native-inputs (list python-setuptools))
(home-page "https://github.com/Kami/python-test-utils/")
(synopsis "Utilities for functional and integration tests")
(description
@@ -3875,27 +4260,58 @@ data in a standard way.")
which make writing and running functional and integration tests easier.")
(license license:asl2.0)))
+(define-public python-test2ref
+ (package
+ (name "python-test2ref")
+ (version "1.1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "test2ref" version))
+ (sha256
+ (base32 "1jx7cdqwpyq3gs9czvz0fwijkqhvmbny5h3zgdqlbrw8y3miv4gq"))))
+ (build-system pyproject-build-system)
+ (native-inputs
+ (list python-pdm-backend
+ python-pytest
+ python-pytest-cov))
+ (propagated-inputs
+ (list python-binaryornot))
+ (home-page "https://github.com/nbiotcloud/test2ref")
+ (synopsis "Testing Against Learned Reference Data")
+ (description
+ "This package provides a unit tests framework backed by ML features and
+working in two modes:
+
+@itemize
+@item Testing: Test result in @code{tmp_path} is compared against a known
+reference. Any deviation in the files, causes a fail.
+@item Learning: The test result in @code{tmp_path} is taken as reference and
+is copied to the reference folder, which should be committed to version
+control and kept as reference.
+@end itemize")
+ (license license:expat)))
+
(define-public python-testfixtures
(package
(name "python-testfixtures")
- (version "6.17.1")
+ (version "9.1.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "testfixtures" version))
(sha256
- (base32 "1nlv2hz20czjp4a811ichl5kwg99rh84l0mw9wq4rk3idzfs1hsy"))))
- (build-system python-build-system)
+ (base32 "10hlw2y1rjzmfm87dlisbiwf0zyjbnj0q471799j69wlagrrqzji"))))
+ (build-system pyproject-build-system)
(arguments
`(#:tests? #f)) ; PyTest-Django fails to build in master
(native-inputs
- (list python-pytest python-pytest-cov
- ;;("python-pytest-django" ,python-pytest-django)
- python-twine python-wheel))
- (synopsis "Tests components for Python")
- (description "Testfixtures is a collection of helpers and mock objects that
-are useful when writing automated tests in Python.")
+ (list python-setuptools))
(home-page "https://testfixtures.readthedocs.io/en/latest/")
+ (synopsis "Tests components for Python")
+ (description
+ "Testfixtures is a collection of helpers and mock objects that are useful
+when writing automated tests in Python.")
(license license:expat)))
(define-public python-time-machine
@@ -3909,6 +4325,8 @@ are useful when writing automated tests in Python.")
(sha256
(base32 "1qn7cj9lx3m7pwa8ak1106f9c54yvpa996x84gfqmyfjfg1ar6aa"))))
(build-system pyproject-build-system)
+ (arguments
+ `(#:tests? #f)) ;no tests in PyPI archive
(propagated-inputs (list python-dateutil))
(native-inputs (list python-setuptools python-wheel))
(home-page "https://github.com/adamchainz/time-machine")
@@ -3917,6 +4335,8 @@ are useful when writing automated tests in Python.")
(license license:expat)))
(define-public python-tox
+ ;; NOTE: Try to avoid including it in inputs, it's for the local development
+ ;; only.
(package
(name "python-tox")
(version "4.23.2")
@@ -3931,20 +4351,20 @@ are useful when writing automated tests in Python.")
(arguments
(list
#:test-flags
- '(list "-k"
- (string-join
- (map (lambda (test)
- (string-append "not test_" test))
- '( ;; These freeze the test suite
- "parallel"
- "parallel_live"
- ;; Needs internet access
- "build_wheel_external"
- "run_installpkg_targz"
- "python_generate_hash_seed"
- ;; XXX Tries to call python-wrapper-3.10.7/bin/tox
- "call_as_exe"))
- " and "))))
+ #~(list "-k" (string-join
+ ;; These freeze the test suite
+ (list "not test_parallel"
+ "test_parallel_live"
+ ;; Needs internet access
+ "test_build_wheel_external"
+ "test_run_installpkg_targz"
+ "test_python_generate_hash_seed"
+ ;; XXX Tries to call python-wrapper-3.10.7/bin/tox
+ "test_call_as_exe"
+ ;; assert 'covdefaults>=1.2; python_version == "2.7"
+ ;; or python_version == "3.11"' == 'sphinx>=3'
+ "test_load_dependency_many_extra")
+ " and not "))))
(propagated-inputs
(list python-cachetools
python-chardet
@@ -4126,6 +4546,41 @@ dead code. Also, code that is only called implicitly may be reported as
unused.")
(license license:expat)))
+(define-public python-xdoctest
+ (package
+ (name "python-xdoctest")
+ (version "1.3.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "xdoctest" version))
+ (sha256
+ (base32 "1m69yvc3bl9jj5av89p9jl08w9lsn0k3lqclpdbiq0g67fdbjb7r"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; A writable HOME is needed by the 'import_module_from_path'
+ ;; test.
+ (setenv "HOME" "/tmp"))))))
+ (native-inputs
+ (list cmake-minimal
+ ninja
+ pybind11
+ python-pytest-bootstrap
+ python-scikit-build
+ python-setuptools))
+ (home-page "https://github.com/Erotemic/xdoctest")
+ (synopsis "Rewrite of the Python builtin doctest module")
+ (description
+ "This package provides a rewrite of the builtin doctest module which
+ leverages the Python @acronym{AST, Abstract Syntax Tree} instead of
+@acronym{REGEXPs, regular expressions}.")
+ (license license:asl2.0)))
+
(define-public python-xunitparser
(package
(name "python-xunitparser")