diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2021-10-12 16:50:47 +0000 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2021-10-12 17:46:23 +0000 |
commit | a1eca979fb8da842e73c42f4f53be29b169810f2 (patch) | |
tree | 681c7283e412bb8a29c2531c4408b49c3e184764 /gnu/packages/check.scm | |
parent | 48d86a9ec6d8d2e97da2299ea41a03ef4cdaab83 (diff) | |
parent | 371aa5777a3805a3886f3feea5f1960fe3fe4219 (diff) | |
download | guix-a1eca979fb8da842e73c42f4f53be29b169810f2.tar.gz |
Merge remote-tracking branch 'origin/master' into core-updates-frozen.
Diffstat (limited to 'gnu/packages/check.scm')
-rw-r--r-- | gnu/packages/check.scm | 95 |
1 files changed, 88 insertions, 7 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 7b08f55e21..c839f83c1d 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -969,18 +969,26 @@ standard library.") (define-public python-pytest (package (name "python-pytest") - (version "6.2.1") + (version "6.2.4") (source (origin (method url-fetch) (uri (pypi-uri "pytest" version)) (sha256 (base32 - "01n3jny7m05r6g7gphbkj2xdms75ql93x69crd377hlvi6qikr36")))) + "0jy5f83la1864ss42dhsi1mcm5nl79d8bjg7wk474nlw1c5avg2h")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'fix-version + ;; The version string is usually derived via setuptools-scm, but + ;; without the git metadata available, the version string is set to + ;; '0.0.0'. + (lambda _ + (substitute* "setup.py" + (("setup\\(\\)") + (format #f "setup(version=~s)" ,version))))) (replace 'check (lambda* (#:key (tests? #t) #:allow-other-keys) (setenv "TERM" "dumb") ;attempt disabling markup tests @@ -1093,6 +1101,39 @@ and many external plugins.") ("python-py" ,python2-py) ("python-wcwidth" ,python2-wcwidth)))))) +(define-public python-pytest-assume + (package + (name "python-pytest-assume") + (version "2.4.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest-assume" version)) + (sha256 + (base32 "0zilqsy9fcjr6l2f9qzfxpkp40h24csnjm5mifhpmzb0fr9r0glq")))) + (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 + `(("python-pytest" ,python-pytest) + ("python-six" ,python-six))) + (home-page "https://github.com/astraw38/pytest-assume") + (synopsis "Pytest plugin that allows multiple failures per test") + + (description "This package provides a Pytest plugin that allows multiple +failures per test. This is a fork from pytest-expect which includes the +following improvements: +@itemize +@item showlocals support (the Pytest option) +@item global usage support (a fixture is not required) +@item output refinements and tweaks. +@end itemize") + (license license:expat))) + (define-public python-pytest-cov (package (name "python-pytest-cov") @@ -1159,6 +1200,36 @@ supports coverage of subprocesses.") contacting the real http server.") (license license:expat))) +(define-public python-pytest-random-order + (package + (name "python-pytest-random-order") + (version "1.0.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest-random-order" version)) + (sha256 + (base32 "0lpzl218l04vjy4gckrbrcacc3w9xrjnvz64bf2i132c58s5j8bb")))) + (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" "--random-order"))))))) + (propagated-inputs + `(("python-pytest" ,python-pytest))) + (home-page "https://github.com/jbasko/pytest-random-order") + (synopsis "Pytest plugin to randomize the order of tests") + (description "@code{pytest-random-order} is a Pytest plugin that +randomizes the order of tests. This can be useful to detect a test that +passes just because it happens to run after an unrelated test that leaves the +system in a favourable state. The plugin allows user to control the level of +randomness they want to introduce and to disable reordering on subsets of +tests. Tests can be rerun in a specific order by passing a seed value +reported in a previous test run.") + (license license:expat))) + (define-public python-pytest-runner (package (name "python-pytest-runner") @@ -1280,11 +1351,21 @@ same arguments.") (define-public python2-pytest-mock (let ((base (package-with-python2 - (strip-python2-variant python-pytest-mock)))) + (strip-python2-variant python-pytest-mock)))) (package/inherit base + (version "1.10.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest-mock" version)) + (sha256 + (base32 + "1i5mg3ff1qk0wqfcxfz60hwy3q5dskdp36i10ckigkzffg8hc3ad")))) + (arguments + `(#:python ,python-2)) (propagated-inputs `(("python2-mock" ,python2-mock) - ,@(package-propagated-inputs base)))))) + ("python2-pytest" ,python2-pytest)))))) (define-public python-pytest-xdist (package @@ -2671,8 +2752,7 @@ retried.") (name "python-pyhamcrest") (version "2.0.2") (source (origin - ;; Tests not distributed from pypi release. - (method git-fetch) + (method git-fetch) ;no tests in PyPI archive (uri (git-reference (url "https://github.com/hamcrest/PyHamcrest") (commit (string-append "V" version)))) @@ -2689,7 +2769,8 @@ retried.") (arguments `(#:phases (modify-phases %standard-phases (replace 'check - (lambda _ + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) (invoke "pytest" "-vv")))))) (home-page "http://hamcrest.org/") (synopsis "Hamcrest matchers for Python") |