aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/check.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/check.scm')
-rw-r--r--gnu/packages/check.scm231
1 files changed, 102 insertions, 129 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 92f4935927..8e1eb127b2 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -25,7 +25,7 @@
;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2017 ng0 <ng0@infotropique.org>
;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
;;;
@@ -49,6 +49,7 @@
#:use-module (gnu packages autotools)
#:use-module (gnu packages bash)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages llvm)
#:use-module (gnu packages golang)
#:use-module (gnu packages python)
#:use-module (gnu packages python-web)
@@ -67,15 +68,15 @@
(define-public check
(package
(name "check")
- (version "0.10.0")
+ (version "0.12.0")
(source
(origin
(method url-fetch)
- (uri (string-append "https://github.com/libcheck/check/files/71408/"
- "/check-" version ".tar.gz"))
+ (uri (string-append "https://github.com/libcheck/check/releases/download/"
+ version "/check-" version ".tar.gz"))
(sha256
(base32
- "0lhhywf5nxl3dd0hdakra3aasl590756c9kmvyifb3vgm9k0gxgm"))))
+ "0d22h8xshmbpl9hba9ch3xj8vb9ybm5akpsbbh7yj07fic4h2hj6"))))
(build-system gnu-build-system)
(home-page "https://libcheck.github.io/check/")
(synopsis "Unit test framework for C")
@@ -88,20 +89,6 @@ faults or other signals. The output from unit tests can be used within
source code editors and IDEs.")
(license license:lgpl2.1+)))
-;; XXX: Some packages require this newer version. Incorporate this
-;; into the main 'check' package during the next rebuild cycle.
-(define-public check-0.11.0
- (package
- (inherit check)
- (version "0.11.0")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/libcheck/check/releases"
- "/download/" version "/check-" version ".tar.gz"))
- (sha256
- (base32
- "05jn1pgb7hqb937xky2147nnq3r4qy5wwr79rddpax3bms5a9xr4"))))))
-
(define-public cunit
(package
(name "cunit")
@@ -481,45 +468,43 @@ for every Python test framework. It supports nose, py.test, and unittest.")
(define-public python-mock
(package
(name "python-mock")
- (version "1.0.1")
+ (version "2.0.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "mock" version))
(sha256
(base32
- "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
+ "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
+ (propagated-inputs
+ `(("python-pbr" ,python-pbr-minimal)
+ ("python-six" ,python-six)))
(build-system python-build-system)
- (arguments '(#:test-target "check"))
+ (native-inputs
+ `(("python-unittest2" ,python-unittest2)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (zero? (system* "unit2")))))))
(home-page "https://github.com/testing-cabal/mock")
(synopsis "Python mocking and patching library for testing")
(description
"Mock is a library for testing in Python. It allows you to replace parts
of your system under test with mock objects and make assertions about how they
have been used.")
+ (properties `((python2-variant . ,(delay python2-mock))))
(license license:expat)))
(define-public python2-mock
- (package-with-python2 python-mock))
-
-;;; Some packages (notably, certbot and python-acme) rely on this newer version
-;;; of python-mock. However, a large number of packages fail to build with
-;;; mock@2, so we add a new variable for now. Also, there may be a dependency
-;;; cycle between mock and six, so we avoid creating python2-mock@2 for now.
-(define-public python-mock-2
- (package
- (inherit python-mock)
- (version "2.0.0")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "mock" version))
- (sha256
- (base32
- "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
- (propagated-inputs
- `(("python-pbr" ,python-pbr-minimal)
- ,@(package-propagated-inputs python-mock)))))
+ (let ((base (package-with-python2
+ (strip-python2-variant python-mock))))
+ (package (inherit base)
+ (propagated-inputs
+ `(("python2-functools32" ,python2-functools32)
+ ("python2-funcsigs" ,python2-funcsigs)
+ ,@(package-propagated-inputs base))))))
(define-public python-nose
(package
@@ -576,17 +561,27 @@ interfaces and processes.")
(define-public python-unittest2
(package
(name "python-unittest2")
- (version "0.5.1")
+ (version "1.1.0")
(source
(origin
(method url-fetch)
- (uri (string-append
- "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
- version ".tar.gz"))
+ (uri (pypi-uri "unittest2" version))
+ (patches
+ (search-patches "python-unittest2-python3-compat.patch"
+ "python-unittest2-remove-argparse.patch"))
(sha256
(base32
- "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
+ "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212"))))
(build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (zero? (system* "python" "-m" "unittest2" "discover" "--verbose")))))))
+ (propagated-inputs
+ `(("python-six" ,python-six)
+ ("python-traceback2" ,python-traceback2)))
(home-page "http://pypi.python.org/pypi/unittest2")
(synopsis "Python unit testing library")
(description
@@ -595,54 +590,44 @@ standard library.")
(license license:psfl)))
(define-public python2-unittest2
- (package (inherit python-unittest2)
- (name "python2-unittest2")
- (version "1.1.0")
- (source
- (origin
- (method url-fetch)
- (uri (string-append
- "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
- version ".tar.gz"))
- (sha256
- (base32
- "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212"))
- (patches
- (search-patches "python2-unittest2-remove-argparse.patch"))))
- (propagated-inputs
- `(("python2-six" ,python2-six)
- ("python2-traceback2" ,python2-traceback2)))
- (arguments
- `(#:python ,python-2
- #:tests? #f)))) ; no setup.py test command
+ (package-with-python2 python-unittest2))
(define-public python-pytest
(package
(name "python-pytest")
- (version "2.7.3")
+ (version "3.2.3")
(source
(origin
(method url-fetch)
- (uri (string-append
- "https://pypi.python.org/packages/source/p/pytest/pytest-"
- version ".tar.gz"))
+ (uri (pypi-uri "pytest" version))
(sha256
(base32
- "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
- (modules '((guix build utils)))
- (snippet
- ;; One of the tests involves the /usr directory, so it fails.
- '(substitute* "testing/test_argcomplete.py"
- (("def test_remove_dir_prefix\\(self\\):")
- "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
+ "0g6w86ks73fnrnsyib9ii2rbyx830vn7aglsjqz9v1n2xwbndyi7"))))
(build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'disable-invalid-tests
+ (lambda _
+ ;; Some tests involves the /usr directory, and fails.
+ (substitute* "testing/test_argcomplete.py"
+ (("def test_remove_dir_prefix\\(self\\):")
+ "@pytest.mark.xfail\n def test_remove_dir_prefix(self):"))
+ (substitute* "testing/test_argcomplete.py"
+ (("def test_remove_dir_prefix" line)
+ (string-append "@pytest.mark.skip"
+ "(reason=\"Assumes that /usr exists.\")\n "
+ line)))
+ #t)))))
(propagated-inputs
`(("python-py" ,python-py)))
(native-inputs
`(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
("bash" ,bash)
+ ("python-hypothesis" ,python-hypothesis)
("python-nose" ,python-nose)
- ("python-mock" ,python-mock)))
+ ("python-mock" ,python-mock)
+ ("python-setuptools-scm" ,python-setuptools-scm)))
(home-page "http://pytest.org")
(synopsis "Python testing library")
(description
@@ -654,41 +639,15 @@ and many external plugins.")
(define-public python2-pytest
(package-with-python2 python-pytest))
-;; Some packages require a newer pytest.
-(define-public python-pytest-3.0
+(define-public python-pytest-bootstrap
(package
(inherit python-pytest)
- (name "python-pytest")
- (version "3.0.7")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "pytest" version))
- (sha256
- (base32
- "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'check 'disable-invalid-test
- (lambda _
- (substitute* "testing/test_argcomplete.py"
- (("def test_remove_dir_prefix" line)
- (string-append "@pytest.mark.skip"
- "(reason=\"Assumes that /usr exists.\")\n "
- line)))
- #t)))))
- (native-inputs
- `(("python-hypothesis" ,python-hypothesis)
- ,@(package-native-inputs python-pytest)))
- (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
+ (name "python-pytest-bootstrap")
+ (native-inputs `(("python-setuptools-scm" ,python-setuptools-scm)))
+ (arguments `(#:tests? #f))))
-(define-public python2-pytest-3.0
- (let ((base (package-with-python2
- (strip-python2-variant python-pytest-3.0))))
- (package (inherit base)
- (native-inputs
- `(("python2-enum34" ,python2-enum34)
- ,@(package-native-inputs base))))))
+(define-public python2-pytest-bootstrap
+ (package-with-python2 python-pytest-bootstrap))
(define-public python-pytest-cov
(package
@@ -750,7 +709,7 @@ supports coverage of subprocesses.")
(string-append "version = \"" ,version "\"")))
#t)))))
(native-inputs
- `(("python-pytest" ,python-pytest)
+ `(("python-pytest" ,python-pytest-bootstrap)
("python-setuptools-scm" ,python-setuptools-scm)))
(home-page "https://github.com/pytest-dev/pytest-runner")
(synopsis "Invoke py.test as a distutils command")
@@ -765,17 +724,17 @@ supports coverage of subprocesses.")
(define-public python-pytest-mock
(package
(name "python-pytest-mock")
- (version "1.2")
+ (version "1.6.3")
(source
(origin
(method url-fetch)
- (uri (pypi-uri "pytest-mock" version ".zip"))
+ (uri (pypi-uri "pytest-mock" version))
(sha256
(base32
- "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
+ "075v7b2wm5f839r1a30n21wfk5rfqp3d05q7zb9jlb2wmxki23cj"))))
(build-system python-build-system)
(native-inputs
- `(("unzip" ,unzip)))
+ `(("python-setuptools-scm" ,python-setuptools-scm)))
(propagated-inputs
`(("python-pytest" ,python-pytest)))
(home-page "https://github.com/pytest-dev/pytest-mock/")
@@ -1075,14 +1034,14 @@ have failed since the last commit or what tests are currently failing.")
(define-public python-coverage
(package
(name "python-coverage")
- (version "4.1")
+ (version "4.4.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "coverage" version))
(sha256
(base32
- "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
+ "097l4s3ssxm1vncsn0nw3a1pbzah28773q36c1ab9wz01r04973s"))))
(build-system python-build-system)
(arguments
;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
@@ -1223,13 +1182,13 @@ the last py.test invocation.")
(define-public python-pytest-localserver
(package
(name "python-pytest-localserver")
- (version "0.3.5")
+ (version "0.4.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "pytest-localserver" version))
(sha256
(base32
- "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
+ "08f06rvj31wqf0vgmd1waya87r7vy6x8ck48lxl3dxy83q5gcam7"))))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
@@ -1308,7 +1267,7 @@ normally the case.")
(build-system python-build-system)
(native-inputs
`(("python-flake8" ,python-flake8)
- ("python-pytest" ,python-pytest)))
+ ("python-pytest" ,python-pytest-bootstrap)))
(synopsis "Library for property based testing")
(description "Hypothesis is a library for testing your Python code against a
much larger range of examples than you would ever want to write by hand. It’s
@@ -1343,9 +1302,9 @@ seamlessly into your existing Python unit testing work flow.")
(modify-phases %standard-phases
(replace 'check
(lambda _
- (invoke "py.test"))))))
+ (invoke "python" "lit.py" "tests"))))))
(native-inputs
- `(("python-pytest" ,python-pytest)))
+ `(("llvm" ,llvm)))
(home-page "https://llvm.org/")
(synopsis "LLVM Software Testing Tool")
(description "@code{lit} is a portable tool for executing LLVM and Clang
@@ -1550,16 +1509,21 @@ recognize TestCases.")
"0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
(build-system python-build-system)
(propagated-inputs
- `(("pytest" ,python-pytest-3.0)))
+ `(("pytest" ,python-pytest)))
(home-page "https://github.com/fschulze/pytest-warnings")
(synopsis "Pytest plugin to list Python warnings in pytest report")
(description
"Python-pytest-warnings is a pytest plugin to list Python warnings in
pytest report.")
- (license license:expat)))
+ (license license:expat)
+ (properties `((python2-variant . ,(delay python2-pytest-warnings))
+ ;; This package is part of pytest as of version 3.1.0.
+ (superseded . ,python-pytest)))))
(define-public python2-pytest-warnings
- (package-with-python2 python-pytest-warnings))
+ (package (inherit (package-with-python2
+ (strip-python2-variant python-pytest-warnings)))
+ (properties `((superseded . ,python2-pytest)))))
(define-public python-pytest-capturelog
(package
@@ -1574,7 +1538,7 @@ pytest report.")
"038049nyjl7di59ycnxvc9nydivc5m8np3hqq84j2iirkccdbs5n"))))
(build-system python-build-system)
(propagated-inputs
- `(("pytest" ,python-pytest-3.0)))
+ `(("pytest" ,python-pytest)))
(home-page "https://bitbucket.org/memedough/pytest-capturelog/overview")
(synopsis "Pytest plugin to catch log messages")
(description
@@ -1599,7 +1563,7 @@ pytest report.")
(native-inputs
`(("unzip" ,unzip)))
(propagated-inputs
- `(("pytest" ,python-pytest-3.0)))
+ `(("pytest" ,python-pytest)))
(home-page "https://github.com/eisensheng/pytest-catchlog")
(synopsis "Pytest plugin to catch log messages")
(description
@@ -1737,6 +1701,15 @@ JSON APIs with Behave.")
(base32
"11x5nx5b4wdq04s7vj1gcdl07jvvkfb37p0r5lg773gr5rr8mj6h"))))
(build-system python-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'patch-setup.py
+ (lambda _
+ ;; Six is only required for tests and later versions
+ ;; work fine.
+ (substitute* "setup.py"
+ (("six==1.10.0") "six"))
+ #t)))))
(propagated-inputs
`(("python-colorama" ,python-colorama)
("python-termstyle" ,python-termstyle)))
@@ -1915,7 +1888,7 @@ retried.")
(native-inputs ; All native inputs are for tests
`(("python-pytest-cov" ,python-pytest-cov)
("python-mock" ,python-mock)
- ("python-pytest" ,python-pytest-3.0)
+ ("python-pytest" ,python-pytest)
("python-hypothesis" ,python-hypothesis)))
(propagated-inputs
`(("python-six" ,python-six)))