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.scm630
1 files changed, 416 insertions, 214 deletions
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index b1af78d4f8..6bd86d451f 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
@@ -80,14 +80,47 @@ data in a standard way.")
(base32 "1rcv4m850rl7djzdgzz2zhjd8g5ih8w6l0sj2f9hsynymlsq82xl"))))
(build-system python-build-system)
(propagated-inputs
- `(("python-click" ,python-click)
- ("python-pytest" ,python-pytest)))
+ (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.")
(license license:expat)))
+(define-public python-pytest-csv
+ (package
+ (name "python-pytest-csv")
+ (version "3.0.0")
+ (source
+ (origin
+ (method git-fetch) ;no tests in PyPI archive
+ (uri (git-reference
+ (url "https://github.com/nicoulaj/pytest-csv")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "17518f2fn5l98lyk9p8r7215c1whi61imzrh6ahrmcksr8w0zz04"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest")))))))
+ (native-inputs
+ (list python-pytest-flake8 python-pytest-xdist-next python-tabulate))
+ (propagated-inputs
+ (list python-pytest-6 python-six))
+ (home-page "https://github.com/nicoulaj/pytest-csv")
+ (synopsis "CSV reporter for Pytest")
+ (description "This package provides a plugin for Pytest that enables a
+CSV output mode for Pytest. It can be enabled via the @option{--csv} option
+it adds to the Pytest command line interface (CLI).")
+ (license license:gpl3+)))
+
(define-public python-testfixtures
(package
(name "python-testfixtures")
@@ -102,11 +135,9 @@ interfaces with pytest.")
(arguments
`(#:tests? #f)) ; PyTest-Django fails to build in master
(native-inputs
- `(("python-pytest" ,python-pytest)
- ("python-pytest-cov" ,python-pytest-cov)
- ;;("python-pytest-django" ,python-pytest-django)
- ("python-twine" ,python-twine)
- ("python-wheel" ,python-wheel)))
+ (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.")
@@ -140,14 +171,9 @@ are useful when writing automated tests in Python.")
(invoke "pytest" "-vv")
(format #t "test suite not run~%")))))))
(propagated-inputs
- `(("python-coverage" ,python-coverage)
- ("python-docopt" ,python-docopt)
- ("python-pyyaml" ,python-pyyaml)
- ("python-requests" ,python-requests)))
+ (list python-coverage python-docopt python-pyyaml python-requests))
(native-inputs
- `(("python-mock" ,python-mock)
- ("python-pytest" ,python-pytest)
- ("python-responses" ,python-responses)))
+ (list python-mock python-pytest python-responses))
(synopsis "Show coverage stats online via coveralls.io")
(description
"Coveralls.io is a service for publishing code coverage statistics online.
@@ -179,9 +205,9 @@ nosetests, etc...) in Python projects.")
(lambda _
(invoke "pytest" "-vv"))))))
(native-inputs
- `(("python-pytest" ,python-pytest)))
+ (list python-pytest))
(propagated-inputs
- `(("python-six" ,python-six)))
+ (list python-six))
(synopsis "Create JUnit XML test results")
(description
"This package provides a Python module for creating JUnit XML test
@@ -191,25 +217,40 @@ result documents that can be read by tools such as Jenkins or Bamboo.")
(define-public python-vcrpy
(package
(name "python-vcrpy")
- (version "2.0.1")
+ (version "4.1.1")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "vcrpy" version))
- (sha256
- (base32
- "0kws7l3hci1dvjv01nxw3805q9v2mwldw58bgl8s90wqism69gjp"))))
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "vcrpy" version))
+ (sha256
+ (base32 "16gmzxs3lzbgf1828n0q61vbmwyhpvzdlk37x6gdk8n05zr5n2ap"))))
(build-system python-build-system)
- (arguments `(#:tests? #f)) ; tests require more packages for python-pytest-httpbin
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? outputs #:allow-other-keys)
+ (when tests?
+ (substitute* "tox.ini"
+ (("AWS_ACCESS_KEY_ID") "PYTHONPATH"))
+ ;; These tests require network access.
+ (delete-file "tests/unit/test_stubs.py")
+ (invoke "pytest" "tests/unit")))))))
(propagated-inputs
- `(("python-pyyaml" ,python-pyyaml)
- ("python-six" ,python-six)
- ("python-wrapt" ,python-wrapt)
- ("python-yarl" ,python-yarl)))
+ (list python-pyyaml python-six python-wrapt python-yarl))
(native-inputs
- `(("python-mock" ,python-mock)
- ("python-pytest" ,python-pytest)
- ("python-pytest-httpbin" ,python-pytest-httpbin)))
+ (list python-black
+ python-coverage
+ python-flake8
+ python-flask
+ python-httplib2
+ python-ipaddress
+ python-mock
+ python-pytest
+ python-pytest-cov
+ python-pytest-httpbin
+ python-tox
+ python-urllib3))
(home-page "https://github.com/kevin1024/vcrpy")
(synopsis "Automatically mock your HTTP interactions")
(description
@@ -260,7 +301,7 @@ interactions, which will update them to correspond to the new API.")
;; argument passed to @code{pytest.main}.
"not test_run_marker_registered"))))))
(native-inputs
- `(("python-pytest" ,python-pytest)))
+ (list python-pytest))
(home-page "https://github.com/ftobia/pytest-ordering")
(synopsis "Pytest plugin to run your tests in a specific order")
(description
@@ -280,8 +321,7 @@ of tests run in a specific order.")
(base32 "1y87agr324p6x5gvhziymxjlw54pyn4gqnd49papbl941djpkp5g"))))
(build-system python-build-system)
(native-inputs
- `(("pytest" ,python-pytest)
- ("setuptools-scm" ,python-setuptools-scm)))
+ (list python-pytest python-setuptools-scm))
(home-page "https://www.astropy.org/")
(synopsis
"Pytest plugin adding diagnostic data to the header of the test output")
@@ -304,21 +344,26 @@ Astropy project, but is optimized for use with astropy-related projects.")
(base32 "18j6z6y2fvykmcs5z0mldhhaxxn6wzpnhlm2ps7m8r5z5kmh1631"))))
(build-system python-build-system)
(arguments
- ;; No tests provided
- '(#:tests? #f))
+ `(#:tests? #f ; there are no tests
+ #:phases
+ (modify-phases %standard-phases
+ ;; There is a bug somewhere that makes pytest-filter-subpackage appear
+ ;; as version 0.0.0 to setup.py. Remove it from the requirements.
+ (add-after 'unpack 'remove-requirement
+ (lambda _
+ (substitute* "setup.cfg"
+ ((".*pytest-filter-subpackage.*") "")))))))
(native-inputs
- `(("attrs" ,python-attrs)
- ("hypothesis" ,python-hypothesis)
- ("pytest" ,python-pytest)
- ("pytest-arraydiff" ,python-pytest-arraydiff)
- ("pytest-astropy-header" ,python-pytest-astropy-header)
- ("pytest-cov" ,python-pytest-cov)
- ("pytest-doctestplus" ,python-pytest-doctestplus)
- ("pytest-filter-subpackage" ,python-pytest-filter-subpackage)
- ("pytest-mock" ,python-pytest-mock)
- ("pytest-openfiles" ,python-pytest-openfiles)
- ("pytest-remotedata" ,python-pytest-remotedata)
- ("setuptools-scm" ,python-setuptools-scm)))
+ (list python-attrs python-pytest-mock python-setuptools-scm))
+ (propagated-inputs
+ (list python-hypothesis
+ python-pytest-arraydiff
+ python-pytest-astropy-header
+ python-pytest-cov
+ python-pytest-doctestplus
+ python-pytest-filter-subpackage
+ python-pytest-openfiles
+ python-pytest-remotedata))
(home-page "https://github.com/astropy/pytest-astropy")
(synopsis
"Metapackage for all the testing machinery used by the Astropy Project")
@@ -343,8 +388,7 @@ astropy related packages.")
;; Disable tests to avoid the circular dependency problem.
'(#:tests? #f))
(propagated-inputs
- `(("python-numpy" ,python-numpy)
- ("python-six" ,python-six)))
+ (list python-numpy python-six))
(home-page "https://github.com/astropy/pytest-arraydiff")
(synopsis "Pytest plugin to help with comparing array output from tests")
(description
@@ -373,7 +417,7 @@ are too large to conveniently hard-code them in the tests.")
(add-installed-pythonpath inputs outputs)
(invoke "pytest" "-vv"))))))
(native-inputs
- `(("python-pytest" ,python-pytest)))
+ (list python-pytest))
(home-page "https://github.com/astropy/pytest-doctestplus")
(synopsis "Pytest plugin with advanced doctest features")
(description
@@ -381,6 +425,33 @@ are too large to conveniently hard-code them in the tests.")
advanced doctest support and enables the testing of reStructuredText files.")
(license license:bsd-3)))
+(define-public python-pytest-exploratory
+ (package
+ (name "python-pytest-exploratory")
+ (version "0.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest_exploratory" version))
+ (sha256
+ (base32 "159rcqv6wrdqdlag1gz39n6fk58232hbxshan043ljgpp1qfs6xk"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "tests")))))))
+ (propagated-inputs
+ (list python-ipython python-py python-pytest))
+ (native-inputs (list python-pytest))
+ (home-page "https://github.com/nokia/pytest-exploratory")
+ (synopsis "Interactive console for Pytest")
+ (description "This Pytest plugin provides an IPython extension that allows
+for interactively selecting and running Pytest tests.")
+ (license license:expat)))
+
(define-public python-pytest-filter-subpackage
(package
(name "python-pytest-filter-subpackage")
@@ -404,10 +475,7 @@ advanced doctest support and enables the testing of reStructuredText files.")
(add-installed-pythonpath inputs outputs)
(invoke "pytest" "-vv" "-k" "not test_with_rst"))))))
(native-inputs
- `(("python-pytest" ,python-pytest)
- ("python-pytest-cov" ,python-pytest-cov)
- ("python-pytest-doctestplus"
- ,python-pytest-doctestplus)))
+ (list python-pytest python-pytest-cov python-pytest-doctestplus))
(home-page "https://github.com/astropy/pytest-filter-subpackage")
(synopsis "Pytest plugin for filtering based on sub-packages")
(description
@@ -437,11 +505,8 @@ sub-package.")
(add-installed-pythonpath inputs outputs)
(invoke "pytest" "-vv"))))))
(native-inputs
- `(("python-pytest" ,python-pytest)
- ("python-setuptools" ,python-setuptools) ; needs setuptools >= 50.3.2
- ("python-setuptools-scm" ,python-setuptools-scm)
- ("python-setuptools-declarative-requirements"
- ,python-setuptools-declarative-requirements)))
+ (list python-pytest python-setuptools ; needs setuptools >= 50.3.2
+ python-setuptools-scm python-setuptools-declarative-requirements))
(home-page "https://github.com/saltstack/pytest-helpers-namespace")
(synopsis "Pytest Helpers Namespace Plugin")
(description "Pytest Helpers Namespace Plugin provides a helpers pytest
@@ -469,10 +534,9 @@ someone to import them in their actual tests to use them.")
(add-installed-pythonpath inputs outputs)
(invoke "pytest" "-vv"))))))
(native-inputs
- `(("python-setuptools-scm" ,python-setuptools-scm)
- ("python-pytest" ,python-pytest)))
+ (list python-setuptools-scm python-pytest))
(propagated-inputs
- `(("python-psutil" ,python-psutil)))
+ (list python-psutil))
(home-page "https://github.com/astropy/pytest-openfiles")
(synopsis "Pytest plugin for detecting inadvertent open file handles")
(description
@@ -505,9 +569,9 @@ were inadvertently left open at the end of a unit test.")
"not test_default_behavior"
" and not test_strict_with_decorator")))))))
(native-inputs
- `(("python-pytest" ,python-pytest)))
+ (list python-pytest))
(propagated-inputs
- `(("python-six" ,python-six)))
+ (list python-six))
(home-page "https://github.com/astropy/pytest-remotedata")
(synopsis "Pytest plugin for controlling remote data access")
(description
@@ -516,6 +580,74 @@ developers to control unit tests that require access to data from the
internet.")
(license license:bsd-3)))
+(define-public python-pytest-repeat
+ (package
+ (name "python-pytest-repeat")
+ (version "0.9.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest-repeat" version))
+ (sha256
+ (base32 "0nxdbghjz6v4xidl5ky9wlx6z4has3vygj5r7va5ccdb8nbjilsw"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest")))))))
+ (propagated-inputs
+ (list python-pytest))
+ (native-inputs
+ (list python-setuptools-scm))
+ (home-page "https://github.com/pytest-dev/pytest-repeat")
+ (synopsis "Pytest plugin for repeating tests")
+ (description "@code{pytest-repeat} is a plugin for Pytest that makes it
+enables repeating a single test, or multiple tests, a specific number of
+times.")
+ (license license:mpl2.0)))
+
+(define-public python-pytest-mockito
+ (package
+ (name "python-pytest-mockito")
+ (version "0.0.4")
+ (source
+ (origin
+ (method git-fetch) ;no tests in pypi archive
+ (uri (git-reference
+ (url "https://github.com/kaste/pytest-mockito")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0hnpazaw3mglx1c405z2hkavgan99rqb3wgrcqk8x5kmhpay53xx"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "pytest" "-vv")))))))
+ (propagated-inputs
+ (list python-mockito python-pytest))
+ (home-page "https://github.com/kaste/pytest-mockito")
+ (synopsis "Mockito base fixtures for Pytest")
+ (description "The @code{pytest-mockito} plugin provides base Mockito
+fixtures for Pytest. It covers the main entry points of the Mockito mocking
+framework and makes it easy to undo any monkey patching. The fixtures are:
+@itemize
+@item when
+@item when2
+@item expect
+@item patch
+@item unstub
+@item spy2
+@end itemize")
+ (license license:expat)))
+
(define-public python-pytest-mpl
(package
(name "python-pytest-mpl")
@@ -534,11 +666,9 @@ internet.")
(lambda _
(invoke "pytest" "-vv"))))))
(native-inputs
- `(("python-pytest" ,python-pytest)))
+ (list python-pytest))
(propagated-inputs
- `(("python-matplotlib" ,python-matplotlib)
- ("python-nose" ,python-nose)
- ("python-pillow" ,python-pillow)))
+ (list python-matplotlib python-nose python-pillow))
(home-page "https://github.com/matplotlib/pytest-mpl")
(synopsis "Pytest plugin to help with testing figures output from Matplotlib")
(description
@@ -568,8 +698,7 @@ in Pytest.")
(lambda _
(invoke "pytest" "-vv"))))))
(native-inputs
- `(("python-coverage" ,python-coverage)
- ("python-pytest" ,python-pytest)))
+ (list python-coverage python-pytest))
(home-page "https://github.com/asottile/covdefaults")
(synopsis "Coverage plugin to provide opinionated default settings")
(description
@@ -603,8 +732,7 @@ in Pytest.")
(add-installed-pythonpath inputs outputs)
(invoke "pytest" "tests/"))))))
(propagated-inputs
- `(("python-pytest" ,python-pytest)
- ("python-vcrpy" ,python-vcrpy)))
+ (list python-pytest python-vcrpy))
(home-page "https://github.com/ktosiek/pytest-vcr")
(synopsis "Plugin for managing VCR.py cassettes")
(description
@@ -614,20 +742,18 @@ in Pytest.")
(define-public python-pytest-checkdocs
(package
(name "python-pytest-checkdocs")
- (version "1.2.2")
+ (version "1.2.5")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-checkdocs" version))
(sha256
- (base32 "0j6j1gvj6x451y3qsx4xbaq9p1w9gg3mwk7n0w80cy8vdyjkngb0"))))
+ (base32 "0m4kn7141i6k8qr8ak3lbmk9vim11xsrlnrggcfwczfrglc6jmia"))))
(build-system python-build-system)
(propagated-inputs
- `(("python-docutils" ,python-docutils)
- ("python-importlib-metadata" ,python-importlib-metadata)
- ("python-more-itertools" ,python-more-itertools)))
+ (list python-docutils python-importlib-metadata python-more-itertools))
(native-inputs
- `(("python-setuptools-scm" ,python-setuptools-scm)))
+ (list python-setuptools-scm python-pytest))
(home-page "https://github.com/jaraco/pytest-checkdocs")
(synopsis "Check the README when running tests")
(description
@@ -657,11 +783,9 @@ of the project to ensure it renders properly.")
(lambda _
(invoke "pytest" "-vv"))))))
(native-inputs
- `(("python-covdefaults" ,python-covdefaults)
- ("python-coverage" ,python-coverage)
- ("python-pytest" ,python-pytest)))
+ (list python-covdefaults python-coverage python-pytest))
(propagated-inputs
- `(("python-regex" ,python-regex)))
+ (list python-regex))
(home-page "https://github.com/asottile/re-assert")
(synopsis "Show where your regex match assertion failed")
(description
@@ -672,28 +796,33 @@ simpler.")
(define-public python-pytest-trio
(package
(name "python-pytest-trio")
- (version "0.6.0")
+ (version "0.7.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-trio" version))
(sha256
- (base32 "1zm8didm9h5jkqhghl9bvqs7kr7sjci282c7grhk6yhpzn8a9w4v"))))
+ (base32 "0c8cqf9by2884riksrqymqfp2g1d2d798a2zalcw9hmf34c786y0"))))
(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" "-W" "error" "-ra" "-v" "--pyargs"
- "pytest_trio" "--verbose" "--cov"))))))
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "-W" "error" "-ra" "-v" "--pyargs"
+ "pytest_trio" "--verbose" "--cov" "-k"
+ (string-append
+ ;; Needs network
+ "not test_async_yield_fixture_with_nursery"
+ " and not test_try"
+ ;; No keyboard interrupt in our build environment.
+ " and not test_actual_test"))))))))
(native-inputs
- `(("python-hypothesis" ,python-hypothesis)
- ("python-pytest" ,python-pytest)
- ("python-pytest-cov" ,python-pytest-cov)))
+ (list python-hypothesis python-pytest python-pytest-cov))
(propagated-inputs
- `(("python-trio" ,python-trio)))
+ (list python-async-generator python-outcome python-pytest python-trio))
(home-page "https://github.com/python-trio/pytest-trio")
(synopsis "Pytest plugin for trio")
(description
@@ -715,9 +844,9 @@ friendly library for concurrency and async I/O in Python.")
"0syx68xk5ss3hgp3nr2y122w0fgkzr5936ghsqrkymh3m5hrf9gh"))))
(build-system python-build-system)
(propagated-inputs
- `(("python-flake8" ,python-flake8)))
+ (list python-flake8))
(native-inputs
- `(("python-pytest" ,python-pytest)))
+ (list python-pytest))
(home-page "https://github.com/tholo/pytest-flake8")
(synopsis "Pytest plugin to check FLAKE8 requirements")
(description
@@ -744,10 +873,9 @@ compliance.")
(when tests?
(invoke "pytest")))))))
(propagated-inputs
- `(("python-isort" ,python-isort)
- ("python-pytest" ,python-pytest)))
+ (list python-isort python-pytest))
(native-inputs
- `(("python-mock" ,python-mock)))
+ (list python-mock))
(home-page "https://github.com/moccu/pytest-isort/")
(synopsis "Pytest plugin to check import ordering using isort")
(description
@@ -780,14 +908,10 @@ isort.")
"bindir = os.path.realpath('/tmp/bin')"))
#t)))))
(propagated-inputs
- `(("python-contextlib2" ,python-contextlib2)
- ("python-execnet" ,python-execnet)
- ("python-pathpy" ,python-pathpy)
- ("python-termcolor" ,python-termcolor)))
+ (list python-contextlib2 python-execnet python-pathpy
+ python-termcolor))
(native-inputs
- `(("python-mock" ,python-mock)
- ("python-pytest" ,python-pytest)
- ("python-setuptools-git" ,python-setuptools-git)))
+ (list python-mock python-pytest python-setuptools-git))
(home-page "https://github.com/manahl/pytest-plugins")
(synopsis "Assorted shell and environment tools for py.test")
(description
@@ -808,8 +932,7 @@ py.test testing framework.")
"13i1qpz22w3x4dmw8vih5jdnbqfqvl7jiqs0dg764s0zf8bp98a1"))))
(build-system python-build-system)
(native-inputs
- `(("python-pytest" ,python-pytest)
- ("python-setuptools-git" ,python-setuptools-git)))
+ (list python-pytest python-setuptools-git))
(home-page "https://github.com/manahl/pytest-plugins")
(synopsis "Fixture configuration utils for py.test")
(description
@@ -846,14 +969,11 @@ testing framework.")
virtualenv-bin)))
#t))))))
(propagated-inputs
- `(("python-pytest-shutil" ,python-pytest-shutil)
- ("python-pytest-fixture-config" ,python-pytest-fixture-config)))
+ (list python-pytest-shutil python-pytest-fixture-config))
(inputs
- `(("python-virtualenv" ,python-virtualenv)))
+ (list python-virtualenv))
(native-inputs
- `(("python-mock" ,python-mock)
- ("python-pytest" ,python-pytest)
- ("python-setuptools-git" ,python-setuptools-git)))
+ (list python-mock python-pytest python-setuptools-git))
(home-page "https://github.com/manahl/pytest-plugins")
(synopsis "Virtualenv fixture for py.test")
(description "This package provides a virtualenv fixture for the py.test
@@ -873,9 +993,9 @@ framework.")
"02i5gl7pm9cwxk15sn29inz3n8flpj1r3p1l110h43f2na5w8h7z"))))
(build-system python-build-system)
(propagated-inputs
- `(("python-pycodestyle" ,python-pycodestyle)))
+ (list python-pycodestyle))
(native-inputs
- `(("python-pytest" ,python-pytest)))
+ (list python-pytest))
(home-page "https://github.com/henry0312/pytest-pycodestyle")
(synopsis "Pytest plugin to run pycodestyle")
(description "This package provides a plugin to run @code{pycodestyle}
@@ -895,10 +1015,9 @@ for the @code{pytest} framework.")
"0a4mpb4j73dsyk47hd1prrjpfk4r458s102cn80rf253jg818hxd"))))
(build-system python-build-system)
(propagated-inputs
- `(("python-py-cpuinfo" ,python-py-cpuinfo)))
+ (list python-py-cpuinfo))
(native-inputs
- `(("python-pathlib2" ,python-pathlib2)
- ("python-pytest" ,python-pytest)))
+ (list python-pathlib2 python-pytest))
(home-page "https://github.com/ionelmc/pytest-benchmark")
(synopsis "Pytest fixture for benchmarking code")
(description
@@ -930,12 +1049,9 @@ rounds that are calibrated to the chosen timer.")
(delete-file "tests/test_xvfb_windows.py")
#t)))))
(native-inputs
- `(("python-pytest" ,python-pytest)
- ("python-pytest-runner" ,python-pytest-runner)
- ("xorg-server" ,xorg-server-for-tests)))
+ (list python-pytest python-pytest-runner xorg-server-for-tests))
(propagated-inputs
- `(("python-pyvirtualdisplay"
- ,python-pyvirtualdisplay)))
+ (list python-pyvirtualdisplay))
(home-page "https://github.com/The-Compiler/pytest-xvfb")
(synopsis "Pytest plugin to run Xvfb for tests")
(description
@@ -956,10 +1072,9 @@ rounds that are calibrated to the chosen timer.")
(build-system python-build-system)
(arguments '(#:tests? #f)) ; Tests not included in release tarball.
(propagated-inputs
- `(("python-psutil" ,python-psutil)
- ("python-requests" ,python-requests)))
+ (list python-psutil python-requests))
(native-inputs
- `(("python-pytest" ,python-pytest)))
+ (list python-pytest))
(home-page "https://github.com/pytest-dev/pytest-services")
(synopsis "Services plugin for pytest testing framework")
(description
@@ -986,23 +1101,15 @@ service processes for your tests with pytest.")
'(#: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"))))))
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (substitute* "setup.cfg"
+ ((".*timeout.*") ""))
+ ;; Make the installed plugin discoverable by Pytest.
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "-vv")))))))
(native-inputs
- `(("python-coverage" ,python-coverage)
- ("python-docutils" ,python-docutils)
- ("python-flake8" ,python-flake8)
- ("python-isort" ,python-isort)
- ("python-pydantic" ,python-pydantic)
- ("python-pyflakes" ,python-pyflakes)
- ("python-pygments" ,python-pygments)
- ("python-pytest" ,python-pytest)
- ("python-pytest-cov" ,python-pytest-cov)
- ("python-pytest-isort" ,python-pytest-isort)
- ("python-pytest-mock" ,python-pytest-mock)
- ("python-pytest-sugar" ,python-pytest-sugar)))
+ (list python-pydantic python-pytest python-pytest-isort))
(home-page "https://github.com/samuelcolvin/pytest-toolbox")
(synopsis "Numerous useful plugins for Pytest")
(description
@@ -1023,9 +1130,9 @@ new fixtures, new methods and new comparison objects.")
"0kx4mbs9bflycd8x9af0idcjhdgnzri3nw1qb0vpfyb3751qaaf9"))))
(build-system python-build-system)
(native-inputs
- `(("python-pytest" ,python-pytest)))
+ (list python-pytest))
(propagated-inputs
- `(("python-aiohttp" ,python-aiohttp)))
+ (list python-aiohttp))
(home-page "https://github.com/aio-libs/pytest-aiohttp/")
(synopsis "Pytest plugin for aiohttp support")
(description "This package provides a pytest plugin for aiohttp support.")
@@ -1061,14 +1168,10 @@ new fixtures, new methods and new comparison objects.")
;; https://github.com/computationalmodelling/nbval/pull/148.
" and not test_timeouts")))))))
(native-inputs
- `(("python-pytest" ,python-pytest)
- ("python-pytest-cov" ,python-pytest-cov)
- ("python-sympy" ,python-sympy)))
+ (list python-pytest python-pytest-cov python-sympy))
(propagated-inputs
- `(("python-ipykernel" ,python-ipykernel)
- ("python-jupyter-client" ,python-jupyter-client)
- ("python-nbformat" ,python-nbformat)
- ("python-six" ,python-six)))
+ (list python-ipykernel python-jupyter-client python-nbformat
+ python-six))
(home-page "https://github.com/computationalmodelling/nbval")
(synopsis "Pytest plugin to validate Jupyter notebooks")
(description
@@ -1091,10 +1194,8 @@ also ensuring that the notebooks are running without errors.")
"1hln7mwgdzfi5ma0kqfsi768l7p24jhkw8l0imhifwy08nh7hmjd"))))
(build-system python-build-system)
(native-inputs
- `(("python-flask" ,python-flask)
- ("python-pytest" ,python-pytest)
- ("python-setuptools-scm" ,python-setuptools-scm)
- ("python-werkzeug" ,python-werkzeug)))
+ (list python-flask python-pytest python-setuptools-scm
+ python-werkzeug))
(home-page "https://github.com/pytest-dev/pytest-flask")
(synopsis "Pytest fixtures to test Flask applications")
(description
@@ -1104,14 +1205,14 @@ also ensuring that the notebooks are running without errors.")
(define-public python-pytest-console-scripts
(package
(name "python-pytest-console-scripts")
- (version "1.2.0")
+ (version "1.2.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-console-scripts" version))
(sha256
(base32
- "073l2cz11013dl30zjr575ms78j9b2bsbdl1w0gmig37spbkh8aa"))))
+ "1qsw3i2h3psyi5avwf14panx8wxqfik2z7294dy37w8ha415iwn7"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -1124,10 +1225,9 @@ also ensuring that the notebooks are running without errors.")
;; This one test fails because of PATH assumptions
"-k" "not test_elsewhere_in_the_path")))))))
(propagated-inputs
- `(("python-mock" ,python-mock)
- ("python-pytest" ,python-pytest)))
+ (list python-mock python-pytest))
(native-inputs
- `(("python-setuptools-scm" ,python-setuptools-scm)))
+ (list python-setuptools-scm))
(home-page "https://github.com/kvas-it/pytest-console-scripts")
(synopsis "Pytest plugin for testing console scripts")
(description
@@ -1156,8 +1256,7 @@ also ensuring that the notebooks are running without errors.")
(add-installed-pythonpath inputs outputs)
(invoke "pytest" "--verbose")))))))
(propagated-inputs
- `(("python-pytest" ,python-pytest)
- ("python-tornado" ,python-tornado)))
+ (list python-pytest python-tornado))
(home-page "https://github.com/eukaryote/pytest-tornasync")
(synopsis "Pytest plugin for testing Tornado code")
(description
@@ -1178,7 +1277,7 @@ plain (undecoratored) native coroutine tests.")
(base32 "1hl0ln0cicdid4qjk7mv90lw9xkb0v71dlj7q7rn89vzxxm9b53y"))))
(build-system python-build-system)
(native-inputs
- `(("python-pytest" ,python-pytest)))
+ (list python-pytest))
(home-page "https://github.com/MobileDynasty/pytest-env")
(synopsis "Pytest plugin that allows you to add environment variables")
(description
@@ -1226,11 +1325,9 @@ libraries.")
(setenv "QT_QPA_PLATFORM" "offscreen")
#t)))))
(propagated-inputs
- `(("python-pyqt" ,python-pyqt)))
+ (list python-pyqt))
(native-inputs
- `(("python-pytest" ,python-pytest)
- ("python-pytest-runner" ,python-pytest-runner)
- ("python-setuptools-scm" ,python-setuptools-scm)))
+ (list python-pytest python-pytest-runner python-setuptools-scm))
(home-page "https://github.com/pytest-dev/pytest-qt")
(synopsis "Pytest support for PyQt and PySide applications")
(description
@@ -1257,7 +1354,7 @@ interaction, like key presses and mouse clicks.")
(arguments
`(#:tests? #f)); no tests
(propagated-inputs
- `(("python-check-manifest" ,python-check-manifest)))
+ (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
@@ -1280,7 +1377,7 @@ analysing code quality.")
(arguments
`(#:tests? #f)); no tests
(propagated-inputs
- `(("python-requests" ,python-requests)))
+ (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
@@ -1310,7 +1407,7 @@ Python software under test, when they make an HTTP query.")
(lambda _
(invoke "python" "-m" "nose2" "-v"))))))
(native-inputs
- `(("python-nose2" ,python-nose2)))
+ (list python-nose2))
(home-page "https://public.readthedocs.io/")
(synopsis "@code{@@public} decorator for populating @code{__all__}")
(description
@@ -1321,6 +1418,37 @@ the implementation of that name.")
(license (list license:asl2.0
license:lgpl3)))) ; only for setup_helpers.py
+(define-public python-mockito
+ (package
+ (name "python-mockito")
+ (version "1.2.2")
+ (source
+ (origin
+ (method git-fetch) ;no tests in pypi archive
+ (uri (git-reference
+ (url "https://github.com/kaste/mockito-python")
+ (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")))))))
+ (native-inputs
+ (list python-numpy python-pytest))
+ (home-page "https://github.com/kaste/mockito-python")
+ (synopsis "Mocking library for Python")
+ (description "This package provides a Python implementation of the Java
+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-extensions
(package
(name "python-mypy-extensions")
@@ -1344,7 +1472,7 @@ supported by the MyPy typechecker.")
(define-public python-mypy
(package
(name "python-mypy")
- (version "0.790")
+ (version "0.910")
(source
(origin
;; Because of https://github.com/python/mypy/issues/9584, the
@@ -1361,31 +1489,31 @@ supported by the MyPy typechecker.")
(file-name (git-file-name name version))
(sha256
(base32
- "0zq3lpdf9hphcklk40wz444h8w3dkhwa12mqba5j9lmg11klnhz7"))))
+ "16ryn9d48ilcs3yrkrm9ynx36qnv0gkdkc4sbafpagcqgr2f0mrg"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _
- (invoke "pytest" "mypyc"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "mypyc")))))))
(native-inputs
- `(("python-attrs" ,python-attrs)
- ("python-flake8" ,python-flake8)
- ("python-flake8-bugbear" ,python-flake8-bugbear)
- ("python-flake8-pyi" ,python-flake8-pyi)
- ("python-importlib-metadata" ,python-importlib-metadata)
- ("python-lxml" ,python-lxml)
- ("python-psutil" ,python-psutil)
- ("python-pytest" ,python-pytest)
- ("python-pytest-cov" ,python-pytest-cov)
- ("python-pytest-forked" ,python-pytest-forked)
- ("python-pytest-xdist" ,python-pytest-xdist)
- ("python-virtualenv" ,python-virtualenv)))
+ (list python-attrs
+ python-flake8
+ python-flake8-bugbear
+ python-flake8-pyi
+ python-importlib-metadata
+ python-lxml
+ python-psutil
+ python-pytest
+ python-pytest-cov
+ python-pytest-forked
+ python-pytest-xdist
+ python-virtualenv))
(propagated-inputs
- `(("python-mypy-extensions" ,python-mypy-extensions)
- ("python-typing-extensions" ,python-typing-extensions)
- ("python-typed-ast" ,python-typed-ast)))
+ (list python-mypy-extensions python-toml python-typing-extensions
+ python-typed-ast))
(home-page "http://www.mypy-lang.org/")
(synopsis "Static type checker for Python")
(description "Mypy is an optional static type checker for Python that aims
@@ -1436,9 +1564,7 @@ any Python VM with basically no runtime overhead.")
;; https://github.com/PyCQA/astroid/issues/881).
(delete-file "pylama/lint/pylama_pylint.py"))))))
(native-inputs
- `(("python-py" ,python-py)
- ("python-pytest" ,python-pytest)
- ("python-radon" ,python-radon)))
+ (list python-py python-pytest python-radon))
(propagated-inputs
`(("python-mccabe" ,python-mccabe)
("python-mypy", python-mypy-minimal)
@@ -1466,8 +1592,7 @@ McCabe, among others.")
"16bm0mf7wxvy0lgmcs1p8n1ji8pnvj1jvj8zk3am70dkp825iv84"))))
(build-system python-build-system)
(propagated-inputs
- `(("python-mypy-extensions" ,python-mypy-extensions)
- ("python-six" ,python-six)))
+ (list python-mypy-extensions python-six))
(home-page
"https://github.com/dropbox/pyannotate")
(synopsis "Auto-generate PEP-484 annotations")
@@ -1510,8 +1635,7 @@ valid Python syntax that are likely to be commented out code.")
;; Reported upstream: <https://github.com/vesln/robber.py/issues/20>.
(arguments '(#:tests? #f))
(propagated-inputs
- `(("python-mock" ,python-mock)
- ("python-termcolor" ,python-termcolor)))
+ (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")
@@ -1534,15 +1658,15 @@ behavior-driven development (TDD and BDD).")
(arguments
`(#:tests? #f)) ;to avoid circular dependencies
(native-inputs
- `(("python-pbr" ,python-pbr)))
+ (list python-pbr))
(propagated-inputs
- `(("python-cliff" ,python-cliff)
- ("python-fixtures" ,python-fixtures)
- ("python-future" ,python-future)
- ("python-pyyaml" ,python-pyyaml)
- ("python-subunit" ,python-subunit)
- ("python-testtools" ,python-testtools)
- ("python-voluptuous" ,python-voluptuous)))
+ (list python-cliff
+ python-fixtures
+ python-future
+ python-pyyaml
+ python-subunit
+ python-testtools
+ python-voluptuous))
(home-page "https://stestr.readthedocs.io/en/latest/")
(synopsis "Parallel Python test runner")
(description "This package provides the @command{stestr} command, a
@@ -1568,11 +1692,8 @@ help in debugging failures and optimizing the scheduler to improve speed.")
;; Tests depend on python-sanic.
`(#:tests? #f))
(propagated-inputs
- `(("python-httpx" ,python-httpx)
- ("python-async-generator"
- ,python-async-generator)
- ("python-pytest" ,python-pytest)
- ("python-websockets" ,python-websockets)))
+ (list python-httpx python-async-generator python-pytest
+ python-websockets))
(home-page
"https://github.com/yunstanford/pytest-sanic")
(synopsis "Pytest plugin for Sanic")
@@ -1592,8 +1713,7 @@ code asynchronously.")
(base32 "1c987h13dly9919d15w3h747rgn50ilnv7dginhlprxbj564hn4k"))))
(build-system python-build-system)
(native-inputs
- `(("python-pytest" ,python-pytest)
- ("python-pytest-runner" ,python-pytest-runner)))
+ (list python-pytest python-pytest-runner))
(home-page "https://github.com/thombashi/allpairspy")
(synopsis "Pairwise test combinations generator")
(description
@@ -1618,8 +1738,7 @@ most situations.")
(base32 "01v98b6n3yvkfmxf2v38xk5ijqlk6ika0yljwkhl5bh6qhq23498"))))
(build-system python-build-system)
(propagated-inputs
- `(("python-pytest" ,python-pytest)
- ("python-psutil" ,python-psutil)))
+ (list python-pytest python-psutil))
(arguments
;; tests require setuptools-markdown, which is deprecated and not in guix
'(#:tests? #f
@@ -1639,3 +1758,86 @@ or use cases. Design is based on supporting slow, io-bound testing with often
tedious system under test configuration that can benefit from running several
tests at one time.")
(license license:expat)))
+
+(define-public python-aioresponses
+ (package
+ (name "python-aioresponses")
+ (version "0.7.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "aioresponses" version))
+ (sha256
+ (base32 "16p8mdyfirddrsay62ji7rwcrqmmzxzf2isdbfm9cj5p338rbr42"))))
+ (build-system python-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))
+ (home-page "https://github.com/pnuckowski/aioresponses")
+ (synopsis "Mock out requests made by ClientSession from aiohttp package")
+ (description
+ "Aioresponses is a helper to mock/fake web requests in python aiohttp
+package. For requests module there are a lot of packages that help us with
+testing (eg. httpretty, responses, requests-mock). When it comes to testing
+asynchronous HTTP requests it is a bit harder (at least at the beginning).
+The purpose of this package is to provide an easy way to test asynchronous
+HTTP requests.")
+ (license license:expat)))
+
+(define-public python-pytest-rerunfailures
+ (package
+ (name "python-pytest-rerunfailures")
+ (version "10.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest-rerunfailures" version))
+ (sha256
+ (base32 "15v68kggjvkflbqr0vz8gp5yp3pcsk0rz05bpg2l4xp0a6nin7ly"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-pytest python-setuptools))
+ (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-xunitparser
+ (package
+ (name "python-xunitparser")
+ (version "1.3.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "xunitparser" version))
+ (sha256
+ (base32 "05amn9yik0mxg89iiprkb6lrmc7rlccgvwajrpyfi6zbp8mjdsgn"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; See https://github.com/laurentb/xunitparser/pull/11
+ (add-after 'unpack 'fix-test-suite
+ (lambda _
+ (substitute* "xunitparser.py"
+ (("(^ +)self.stderr = None" m indent)
+ (string-append m "\n" indent "self._cleanup = False\n"))))))))
+ (home-page "http://git.p.engu.in/laurentb/xunitparser/")
+ (synopsis "Read JUnit/XUnit XML files and map them to Python objects")
+ (description "xunitparser reads a JUnit/XUnit XML file and maps it to
+Python objects. It tries to use the objects available in the standard
+@code{unittest} module.")
+ (license license:expat)))