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.scm170
1 files changed, 71 insertions, 99 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 5a926eb596..7e713c6e86 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -356,45 +356,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
@@ -451,17 +449,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
@@ -470,54 +478,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
@@ -529,41 +527,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
@@ -625,7 +597,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")
@@ -950,14 +922,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.
@@ -1183,7 +1155,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
@@ -1417,7 +1389,7 @@ 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
@@ -1441,7 +1413,7 @@ pytest report.")
"038049nyjl7di59ycnxvc9nydivc5m8np3hqq84j2iirkccdbs5n"))))
(build-system python-build-system)
(propagated-inputs
- `(("pytest" ,python-pytest-3.0)))
+ `(("pytest" ,python-pytest)))
(home-page "http://bitbucket.org/memedough/pytest-capturelog/overview")
(synopsis "Pytest plugin to catch log messages")
(description
@@ -1466,7 +1438,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