summaryrefslogtreecommitdiff
path: root/gnu/packages/check.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/check.scm')
-rw-r--r--gnu/packages/check.scm387
1 files changed, 175 insertions, 212 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 0d0229330e..ff3eb8b891 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -25,7 +25,7 @@
;;; Copyright © 2017, 2019 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2017 Nikita <nikita@n0.is>
;;; Copyright © 2015, 2017, 2018, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2017, 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
;;; Copyright © 2019, 2021 Pierre Langlois <pierre.langlois@gmx.com>
@@ -35,7 +35,7 @@
;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
-;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
;;;
;;; This file is part of GNU Guix.
@@ -68,6 +68,7 @@
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-check)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
@@ -148,7 +149,27 @@ like Jasmine or Mocha.")
version "/check-" version ".tar.gz"))
(sha256
(base32
- "02m25y9m46pb6n46s51av62kpd936lkfv3b13kfpckgvmh5lxpm8"))))
+ "02m25y9m46pb6n46s51av62kpd936lkfv3b13kfpckgvmh5lxpm8"))
+ (patches
+ (list
+ ;; This patch fixes some tests that would otherwise fail on
+ ;; powerpc64le-linux. Without this patch, the tests make certain
+ ;; assumptions about floating point number precision that are not true
+ ;; on that platform.
+ ;;
+ ;; TODO: Remove this patch when updating to the next check release,
+ ;; since it will be included there. See:
+ ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47698
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://github.com/libcheck/check/commit/"
+ "4fbe702fa4f35bee8a90512f9f59d1441c4ae82e.patch"))
+ (file-name (string-append name
+ "-fix-test-precision-for-ppc.patch"))
+ (sha256
+ (base32
+ "04qg1p9afdd6453k18qskazrvscysdcjz9j6w4i6p5x4xyma19v6")))))))
(build-system gnu-build-system)
(home-page "https://libcheck.github.io/check/")
(synopsis "Unit test framework for C")
@@ -742,7 +763,7 @@ similar to unit tests.")
(define-public cpputest
(package
(name "cpputest")
- (version "3.8")
+ (version "4.0")
(source
(origin
(method url-fetch)
@@ -750,7 +771,7 @@ similar to unit tests.")
version "/cpputest-" version ".tar.gz"))
(sha256
(base32
- "0mk48xd3klyqi7wf3f4wn4zqxxzmvrhhl32r25jzrixzl72wq7f8"))))
+ "1xslavlb1974y5xvs8n1j9zkk05dlw8imy4saasrjlmibl895ii1"))))
(build-system gnu-build-system)
(native-inputs
`(("googletest" ,googletest)))
@@ -947,39 +968,40 @@ standard library.")
(define-public python-pytest
(package
(name "python-pytest")
- (version "5.3.5")
+ (version "6.2.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest" version))
(sha256
(base32
- "139i9cjhrv5aici3skq8iihvfb3lq0d8xb5j7qycr2hlk8cfjpqd"))))
+ "01n3jny7m05r6g7gphbkj2xdms75ql93x69crd377hlvi6qikr36"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda* (#:key (tests? #t) #:allow-other-keys)
+ (setenv "TERM" "dumb") ;attempt disabling markup tests
(if tests?
(invoke "pytest" "-vv" "-k"
(string-append
- ;; These tests involve the /usr directory, and fails.
- "not test_remove_dir_prefix"
- " and not test_argcomplete"
- ;; This test tries to override PYTHONPATH, and
- ;; subsequently fails to locate the test libraries.
- " and not test_collection"))
- (format #t "test suite not run~%"))
- #t)))))
+ ;; This test involve the /usr directory, and fails.
+ " not test_argcomplete"
+ ;; These test do not honor the isatty detection and
+ ;; fail.
+ " and not test_code_highlight"
+ " and not test_color_yes"))
+ (format #t "test suite not run~%")))))))
(propagated-inputs
- `(("python-atomicwrites" ,python-atomicwrites)
- ("python-attrs" ,python-attrs-bootstrap)
+ `(("python-attrs" ,python-attrs-bootstrap)
+ ("python-iniconfig" ,python-iniconfig)
("python-more-itertools" ,python-more-itertools)
("python-packaging" ,python-packaging-bootstrap)
("python-pluggy" ,python-pluggy)
("python-py" ,python-py)
("python-six" ,python-six-bootstrap)
+ ("python-toml" ,python-toml)
("python-wcwidth" ,python-wcwidth)))
(native-inputs
`(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
@@ -989,6 +1011,7 @@ standard library.")
("python-mock" ,python-mock)
("python-pytest" ,python-pytest-bootstrap)
("python-setuptools-scm" ,python-setuptools-scm)
+ ("python-toml" ,python-toml)
("python-xmlschema" ,python-xmlschema)))
(home-page "https://docs.pytest.org/en/latest/")
(synopsis "Python testing library")
@@ -999,45 +1022,6 @@ and many external plugins.")
(license license:expat)
(properties `((python2-variant . ,(delay python2-pytest))))))
-(define-public python-pytest-6
- (package
- (inherit (strip-python2-variant python-pytest))
- (version "6.1.2")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "pytest" version))
- (sha256
- (base32
- "0gl2sdm322vzmsh5k4f8kj9raiq2y7kdinnca4m45ifvii5fk9y0"))))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key (tests? #t) #:allow-other-keys)
- (setenv "TERM" "dumb") ;attempt disabling markup tests
- (if tests?
- (invoke "pytest" "-vv" "-k"
- (string-append
- ;; This test involve the /usr directory, and fails.
- " not test_argcomplete"
- ;; These test do not honor the isatty detection and
- ;; fail.
- " and not test_code_highlight"
- " and not test_color_yes"))
- (format #t "test suite not run~%"))
- #t)))))
- (propagated-inputs
- (append (alist-delete "python-py"
- (package-propagated-inputs python-pytest))
- `(("python-py" ,python-py-next))))
- (native-inputs
- (append (alist-delete "python-pytest"
- (package-native-inputs python-pytest))
- `(("python-pytest" ,python-pytest-6-bootstrap)
- ("python-toml" ,python-toml)
- ("python-iniconfig" ,python-iniconfig))))))
-
;; Pytest 4.x are the last versions that support Python 2.
(define-public python2-pytest
(package
@@ -1078,19 +1062,12 @@ and many external plugins.")
(package
(inherit (strip-python2-variant python-pytest))
(name "python-pytest-bootstrap")
- (native-inputs `(("python-setuptools-scm" ,python-setuptools-scm)))
+ (native-inputs `(("python-iniconfig" ,python-iniconfig)
+ ("python-setuptools-scm" ,python-setuptools-scm)
+ ("python-toml" ,python-toml)))
(arguments `(#:tests? #f))
(properties `((python2-variant . ,(delay python2-pytest-bootstrap))))))
-(define-public python-pytest-6-bootstrap
- (package
- (inherit (strip-python2-variant python-pytest-6))
- (name "python-pytest-bootstrap")
- (arguments `(#:tests? #f))
- (native-inputs
- `(("python-setuptools-scm" ,python-setuptools-scm)
- ("python-toml" ,python-toml)))))
-
(define-public python2-pytest-bootstrap
(hidden-package
(package/inherit
@@ -1313,20 +1290,25 @@ same arguments.")
#t))))
(build-system python-build-system)
(arguments
- '(#:tests? #f)) ;FIXME: Some tests are failing.
- ;; #:phases
- ;; (modify-phases %standard-phases
- ;; (delete 'check)
- ;; (add-after 'install 'check
- ;; (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; (add-installed-pythonpath inputs outputs)
- ;; (zero? (system* "py.test" "-v")))))
+ '(#:tests? #f ; Lots of tests fail.
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-setup-py
+ (lambda _
+ ;; Relax pytest requirement.
+ (substitute* "setup.py"
+ (("pytest>=6\\.0\\.0") "pytest"))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "py.test" "-v")))))))
(native-inputs
`(("python-setuptools-scm" ,python-setuptools-scm)))
(propagated-inputs
`(("python-execnet" ,python-execnet)
("python-pytest" ,python-pytest)
- ("python-py" ,python-py)))
+ ("python-py" ,python-py)
+ ("python-pytest-forked" ,python-pytest-forked)))
(home-page
"https://github.com/pytest-dev/pytest-xdist")
(synopsis
@@ -1376,19 +1358,18 @@ timeout has been exceeded.")
(define-public python-pytest-forked
(package
(name "python-pytest-forked")
- (version "1.1.3")
+ (version "1.3.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-forked" version))
(sha256
(base32
- "000i4q7my2fq4l49n8idx2c812dql97qv6qpm2vhrrn9v6g6j18q"))))
+ "1jip9qh115zcg1rn7irqx5qycb9k248d5imy86f566md01zaraba"))))
(build-system python-build-system)
- (propagated-inputs
- `(("python-pytest" ,python-pytest)))
(native-inputs
- `(("python-setuptools-scm" ,python-setuptools-scm)))
+ `(("python-pytest" ,python-pytest)
+ ("python-setuptools-scm" ,python-setuptools-scm)))
(home-page
"https://github.com/pytest-dev/pytest-forked")
(synopsis
@@ -1423,25 +1404,20 @@ subprocess and see the output as well as any file modifications.")
(define-public python-testtools-bootstrap
(package
(name "python-testtools-bootstrap")
- (version "2.3.0")
+ (version "2.5.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "testtools" version))
(sha256
(base32
- "0n8519lk8aaa91vymz842831181wf7fss98hyllhygi3z1nfq9sq"))
- (patches (search-patches "python-testtools.patch"))))
+ "0gxjbjk93jjqi491k4s9rh3ia37v21yifd35pvizv7sgv4rk9hap"))))
(build-system python-build-system)
(arguments '(#:tests? #f))
(propagated-inputs
`(("python-extras" ,python-extras)
("python-fixtures" ,python-fixtures-bootstrap)
- ("python-mimeparse" ,python-mimeparse)
- ("python-pbr" ,python-pbr-minimal)
- ("python-six" ,python-six)
- ("python-traceback2" ,python-traceback2)
- ("python-unittest2" ,python-unittest2)))
+ ("python-pbr" ,python-pbr-minimal)))
(home-page "https://github.com/testing-cabal/testtools")
(synopsis
"Extensions to the Python standard library unit testing framework")
@@ -1454,19 +1430,17 @@ subprocess and see the output as well as any file modifications.")
(inherit python-testtools-bootstrap)
(name "python-testtools")
(arguments
- `(#:phases (modify-phases %standard-phases
- (replace 'check
- (lambda _
- (invoke "python" "-m" "testtools.run"
- "testtools.tests.test_suite"))))))
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "testtools.run"
+ "testtools.tests.test_suite")))))))
(propagated-inputs
`(("python-extras" ,python-extras)
("python-fixtures" ,python-fixtures)
- ("python-mimeparse" ,python-mimeparse)
- ("python-pbr" ,python-pbr)
- ("python-six" ,python-six)
- ("python-traceback2" ,python-traceback2)
- ("python-unittest2" ,python-unittest2)))
+ ("python-pbr" ,python-pbr)))
(native-inputs
`(("python-testscenarios" ,python-testscenarios-bootstrap)))
(description
@@ -1597,14 +1571,21 @@ protocol.")))
(package
(name "python-fixtures-bootstrap")
(version "3.0.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "fixtures" version))
- (sha256
- (base32
- "1vxj29bzz3rd4pcy51d05wng9q9dh4jq6wx92yklsm7i6h1ddw7w"))))
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "fixtures" version))
+ (sha256
+ (base32
+ "1vxj29bzz3rd4pcy51d05wng9q9dh4jq6wx92yklsm7i6h1ddw7w"))
+ (patches (search-patches "python-fixtures-remove-monkeypatch-test.patch"))))
(build-system python-build-system)
- (arguments `(#:tests? #f))
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ ;; Package is not loadable on its own at this stage.
+ (delete 'sanity-check))))
(propagated-inputs
`(("python-pbr-minimal" ,python-pbr-minimal)
("python-six" ,python-six)))
@@ -1623,9 +1604,10 @@ python-fixtures package instead.")
'(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _
- (invoke "python" "-m" "testtools.run"
- "fixtures.test_suite"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "testtools.run"
+ "fixtures.test_suite")))))))
(propagated-inputs
;; Fixtures uses pbr at runtime to check versions, etc.
`(("python-pbr" ,python-pbr)
@@ -1709,13 +1691,13 @@ executed.")
(define-public python-pytest-asyncio
(package
(name "python-pytest-asyncio")
- (version "0.10.0")
+ (version "0.15.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-asyncio" version))
(sha256
- (base32 "1bysy4nii13bm7h345wxf8fxcjhab7l374pqdv7vwv3izl053b4z"))))
+ (base32 "0vrzsrg3j1cfd57m0b3r5xf87rslgcs42jya346mdg9bc6wwwr15"))))
(build-system python-build-system)
(native-inputs
`(("python-coverage" ,python-coverage)
@@ -1907,22 +1889,23 @@ framework which enables you to test server connections locally.")
(define-public python-pytest-xprocess
(package
(name "python-pytest-xprocess")
- (version "0.9.1")
+ (version "0.18.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "pytest-xprocess" version))
(sha256
(base32
- "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
+ "0rm2rchrr63imn44xk5slwydxf8gvy579524qcxq7dc42pnk17zx"))))
(build-system python-build-system)
(propagated-inputs
`(("python-pytest" ,python-pytest)
- ("python-pytest-cache" ,python-pytest-cache)
("python-psutil" ,python-psutil)))
+ (native-inputs
+ `(("python-setuptools-scm" ,python-setuptools-scm)))
(synopsis "Pytest plugin to manage external processes across test runs")
(description "Pytest-xprocess is an experimental py.test plugin for managing
processes across test runs.")
- (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
+ (home-page "https://github.com/pytest-dev/pytest-xprocess/")
(license license:expat)))
(define-public python-pytest-subtesthack
@@ -1976,13 +1959,13 @@ instantly.")
(define-public python-hypothesis
(package
(name "python-hypothesis")
- (version "5.4.1")
+ (version "6.0.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "hypothesis" version))
(sha256
(base32
- "0zn09bn6hadk4vxl6jy8bkjr5fz8mrhin3z46w7pq5qgbaycr89p"))))
+ "0wj7ip779naf2n076nylf2gi0sjz68z1ir9d9r2rgs7br18naqdf"))))
(build-system python-build-system)
(arguments
;; XXX: Tests are not distributed with the PyPI archive.
@@ -1999,18 +1982,6 @@ seamlessly into your existing Python unit testing work flow.")
(license license:mpl2.0)
(properties `((python2-variant . ,(delay python2-hypothesis))))))
-(define-public python-hypothesis-5.23
- (package
- (inherit python-hypothesis)
- (version "5.23.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "hypothesis" version))
- (sha256
- (base32
- "0sy1v6nyxg4rjcf3rlr8nalb7wqd9nccpb2lzkchbj5an13ysf1h"))))
- (home-page "https://github.com/HypothesisWorks/hypothesis")))
-
;; This is the last version of Hypothesis that supports Python 2.
(define-public python2-hypothesis
(let ((hypothesis (package-with-python2
@@ -2030,19 +2001,19 @@ seamlessly into your existing Python unit testing work flow.")
(define-public python-hypothesmith
(package
(name "python-hypothesmith")
- (version "0.1.2")
+ (version "0.1.8")
(source
(origin
(method url-fetch)
(uri (pypi-uri "hypothesmith" version))
(sha256
(base32
- "09331sspknv459xcyn1k0lx5flqlc6gmnwp9370pfvg4kg1zmss6"))))
+ "02j101m5grjrbvrgjap17jsxd1hgawkylmyswcn33vf42mxh9zzr"))))
(build-system python-build-system)
(propagated-inputs
- `(("python-hypothesis" ,python-hypothesis-5.23)
+ `(("python-hypothesis" ,python-hypothesis)
("python-lark-parser" ,python-lark-parser)
- ("python-libcst" ,python-libcst)))
+ ("python-libcst" ,python-libcst-minimal)))
(home-page "https://github.com/Zac-HD/hypothesmith")
(synopsis "Strategies for generating Python programs")
(description
@@ -2092,7 +2063,18 @@ failures.")
"06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
(build-system python-build-system)
(arguments
- `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
+ `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-dependencies
+ (lambda _
+ (substitute* "setup.py"
+ (("'pytest-cache', ") "")))) ; Included in recent pytest
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "-v")))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(propagated-inputs
@@ -2177,29 +2159,25 @@ statements in the module it tests.")
(define-public python-pylint
(package
(name "python-pylint")
- (version "2.5.3")
+ (version "2.9.6")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/PyCQA/pylint")
- (commit (string-append "pylint-" version))))
+ (commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "04cgbh2z1mygar63plzziyz34yg6bdr4i0g63jp256fgnqwb1bi3"))))
+ (base32 "15yw69v1cj6zkndk60c2g0dgl0khh8bfm1lrwhjffpdjfc7nkc9a"))))
(build-system python-build-system)
- ;; FIXME: Tests are failing since version 2.4.3, see:
- ;; https://github.com/PyCQA/pylint/issues/3198.
- (arguments '(#:tests? #f))
(native-inputs
`(("python-pytest" ,python-pytest)
- ("python-pytest-runner" ,python-pytest-runner)
- ("python-tox" ,python-tox)))
+ ("python-pytest-benchmark" ,python-pytest-benchmark)
+ ("python-pytest-runner" ,python-pytest-runner)))
(propagated-inputs
`(("python-astroid" ,python-astroid)
("python-isort" ,python-isort)
("python-mccabe" ,python-mccabe)
- ("python-six" ,python-six)
("python-toml" ,python-toml)))
(home-page "https://github.com/PyCQA/pylint")
(synopsis "Python source code analyzer which looks for coding standard
@@ -2388,20 +2366,10 @@ backported from Python 2.7 for Python 2.4+.")
("python-pyhamcrest" ,python-pyhamcrest)
("python-pytest" ,python-pytest)))
(propagated-inputs
- `(("python-importlib-metadata" ,python-importlib-metadata)
- ("python-six" ,python-six)
- ("python-parse" ,python-parse)
+ `(("python-parse" ,python-parse)
("python-parse-type" ,python-parse-type)))
(arguments
- '(#:test-target "behave_test"
- #:phases
- (modify-phases %standard-phases
- (add-before 'check 'fix-library-loading
- (lambda _
- ;; Otherwise, tests fail with no module named 'path'
- (setenv "PYTHONPATH" (string-append (getenv "PYTHONPATH") ":"
- (getcwd) "/tasks/_vendor"))
- #t)))))
+ '(#:test-target "behave_test"))
(home-page "https://github.com/behave/behave")
(synopsis "Python behavior-driven development")
(description
@@ -2640,48 +2608,35 @@ 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
+ ;; Tests not distributed from pypi release.
+ (method git-fetch)
+ (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 ;all native inputs are for tests
+ `(("python-pytest-cov" ,python-pytest-cov)
+ ("python-mock" ,python-mock)
+ ("python-pytest" ,python-pytest)
+ ("python-hypothesis" ,python-hypothesis)))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (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
@@ -2711,7 +2666,7 @@ portable to just about any platform.")
(define-public libfaketime
(package
(name "libfaketime")
- (version "0.9.8")
+ (version "0.9.9")
(home-page "https://github.com/wolfcw/libfaketime")
(source (origin
(method git-fetch)
@@ -2720,35 +2675,35 @@ portable to just about any platform.")
(commit (string-append "v" version))))
(sha256
(base32
- "1mfdl82ppgbdvy1ny8mb7xii7p0g7awvn4bn36jb8v4r545slmjc"))
+ "1gi1xciqga5hl2xlk7rc3j8wy47ag97pi7ngmdl6ny1d11b2wn1z"))
(file-name (git-file-name name version))))
(build-system gnu-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
+ `(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'embed-date-reference
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((coreutils (assoc-ref inputs "coreutils")))
+ (substitute* "src/faketime.c"
+ (("\"date\"")
+ (string-append "\"" coreutils "/bin/date\""))))))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
- (setenv "CC" "gcc")
+ (setenv "CC" ,(cc-for-target))
(setenv "PREFIX" out)
;; XXX: Without this flag, the CLOCK_REALTIME test hangs
;; indefinitely. See README.packagers for more information.
- ;; Try removing this for future versions of libfaketime.
- (setenv "FAKETIME_COMPILE_CFLAGS" "-DFORCE_MONOTONIC_FIX")
-
- #t)))
+ (setenv "FAKETIME_COMPILE_CFLAGS" "-DFORCE_MONOTONIC_FIX"))))
(add-before 'check 'pre-check
(lambda _
(substitute* "test/functests/test_exclude_mono.sh"
- (("/bin/bash") (which "bash")))
-
- ;; Do not fail due to use of 'ftime', which was deprecated in
- ;; glibc 2.31. Remove this for later versions of libfaketime.
- (setenv "FAKETIME_COMPILE_CFLAGS" "-Wno-deprecated-declarations")
- #t)))
+ (("/bin/bash") (which "bash"))))))
#:test-target "test"))
(native-inputs
`(("perl" ,perl))) ;for tests
+ (inputs
+ `(("coreutils" ,coreutils)))
(synopsis "Fake the system time for single applications")
(description
"The libfaketime library allows users to modify the system time that an
@@ -2851,13 +2806,21 @@ grew out of the @dfn{Vc} project.")
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'patch-testsuite
+ (lambda _
+ ;; Time difference is larger than expected.
+ (substitute* "pyfakefs/tests/fake_filesystem_unittest_test.py"
+ (("(\\s+)def test_copy_real_file" all indent)
+ (string-append
+ indent
+ "@unittest.skip('disabled by guix')\n"
+ all)))))
;; The default test suite does not run these extra tests.
(add-after 'check 'check-pytest-plugin
(lambda _
(invoke
"python" "-m" "pytest"
- "pyfakefs/pytest_tests/pytest_plugin_test.py")
- #t)))))
+ "pyfakefs/pytest_tests/pytest_plugin_test.py"))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(build-system python-build-system)