diff options
Diffstat (limited to 'gnu/packages/check.scm')
-rw-r--r-- | gnu/packages/check.scm | 103 |
1 files changed, 60 insertions, 43 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index b49f9de157..9044d65252 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -35,7 +35,7 @@ ;;; Copyright © 2020 Josh Marshall <[email protected]> ;;; Copyright © 2020 Vinicius Monego <[email protected]> ;;; Copyright © 2020 Tanguy Le Carrour <[email protected]> -;;; Copyright © 2020 Maxim Cournoyer <[email protected]> +;;; Copyright © 2020, 2021 Maxim Cournoyer <[email protected]> ;;; Copyright © 2021 Hugo Lecomte <[email protected]> ;;; ;;; This file is part of GNU Guix. @@ -1114,6 +1114,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") @@ -2702,48 +2735,32 @@ retried.") (package-with-python2 python-flaky)) (define-public python-pyhamcrest - ;; The latest release was in 2016 and its test suite does not work with recent - ;; versions of Pytest. Just take the master branch for now, which seems stable. - (let ((commit "25fdc5f00bdf3084335353bc9247253098ec4cf2") - (revision "0")) - (package - (name "python-pyhamcrest") - (version (git-version "1.9.0" revision commit)) - (source (origin - ;; Tests not distributed from pypi release. - (method git-fetch) - (uri (git-reference - (url "https://github.com/hamcrest/PyHamcrest") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1miqmhhi68vaix8sqc1lvpvbm27bacffxh5anm5cbfsvk7g9n6f3")))) - (native-inputs ;all native inputs are for tests - `(("python-pytest-cov" ,python-pytest-cov) - ("python-mock" ,python-mock) - ("python-pytest" ,python-pytest) - ("python-hypothesis" ,python-hypothesis))) - (propagated-inputs - `(("python-six" ,python-six))) - (build-system python-build-system) - (arguments - `(#:phases (modify-phases %standard-phases - (replace 'check - (lambda _ - (setenv "PYTHONPATH" - (string-append "build/lib:" - (getenv "PYTHONPATH"))) - (invoke "pytest" "-vv")))))) - (home-page "http://hamcrest.org/") - (synopsis "Hamcrest matchers for Python") - (description - "PyHamcrest is a framework for writing matcher objects, - allowing you to declaratively define \"match\" rules.") - (license license:bsd-3)))) - -(define-public python2-pyhamcrest - (package-with-python2 python-pyhamcrest)) + (package + (name "python-pyhamcrest") + (version "2.0.2") + (source (origin + (method git-fetch) ;no tests in PyPI archive + (uri (git-reference + (url "https://github.com/hamcrest/PyHamcrest") + (commit (string-append "V" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "05kdzlhs2kvj82pfca13qszszcj6dyrk4b9pbr46x06sq2s4qyls")))) + (native-inputs + `(("python-pytest" ,python-pytest))) + (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" "-vv")))))) + (home-page "http://hamcrest.org/") + (synopsis "Hamcrest matchers for Python") + (description "PyHamcrest is a framework for writing matcher objects, +allowing you to declaratively define \"match\" rules.") + (license license:bsd-3))) (define-public unittest-cpp (package |