;;; Copyright © 2015, 2017 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2015, 2016, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org>
;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
-;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
;;; Copyright © 2017, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2017, 2019 Kei Kebreau <kkebreau@posteo.net>
-;;; Copyright © 2017 ng0 <ng0@n0.is>
-;;; Copyright © 2015, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 Nikita <nikita@n0.is>
+;;; Copyright © 2015, 2017, 2018, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
-;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2019, 2021 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
+;;; 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>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages time)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
+ #:use-module (guix build-system meson)
#:use-module (guix build-system python)
- #:use-module (guix build-system trivial))
+ #:use-module (guix build-system trivial)
+ #:use-module (srfi srfi-1))
+
+(define-public pedansee
+ (package
+ (name "pedansee")
+ (version "0.0.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://www.flyn.org/projects/"
+ name "/" name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0lsg791x6n95pxg6vif8qfc46nqcamhjq3g0dl5xqf6imy7n3acd"))))
+ (build-system glib-or-gtk-build-system)
+ (native-inputs
+ `(("clang" ,clang)
+ ("pkg-config" ,pkg-config)
+ ("python" ,python-wrapper)))
+ (inputs
+ `(("glib" ,glib)))
+ (synopsis "Code checker for C")
+ (description "Pedansee checks C source files for compliance with a particular
+programming style. The style is currently defined by the pedansee source code
+in the form of functions which walk each source file’s syntax tree. You can
+modify some aspects of this style through the use of regular expressions.")
+ (home-page "https://www.flyn.org/projects/pedansee/")
+ (license license:gpl3+)))
+
+(define-public mutest
+ (package
+ (name "mutest")
+ (version "0.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/ebassi/mutest")
+ (commit "e6246c9")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0gdqwq6fvk06wld4rhnw5752hahrvhd69zrci045x25rwx90x26q"))))
+ (build-system meson-build-system)
+ (synopsis "Small C testing library")
+ (description "Mutest aims to be a small unit testing library for C projects,
+with an API heavily modelled on high level Behavior-Driver Development frameworks
+like Jasmine or Mocha.")
+ (home-page "https://ebassi.github.io/mutest/mutest.md.html")
+ (license license:expat)))
(define-public check
(package
(name "check")
- (version "0.14.0")
+ (version "0.15.2")
(source
(origin
(method url-fetch)
version "/check-" version ".tar.gz"))
(sha256
(base32
- "02zkfiyklckmivrfvdsrlzvzphkdsgjrz3igncw05dv5pshhq3xx"))))
+ "02m25y9m46pb6n46s51av62kpd936lkfv3b13kfpckgvmh5lxpm8"))))
(build-system gnu-build-system)
(home-page "https://libcheck.github.io/check/")
(synopsis "Unit test framework for C")
source code editors and IDEs.")
(license license:lgpl2.1+)))
-;; Some packages require this older version. Removed once no longer needed.
+;; Some packages require older versions. Removed once no longer needed.
+(define-public check-0.14
+ (package
+ (inherit check)
+ (version "0.14.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/libcheck/check/releases"
+ "/download/" version "/check-" version ".tar.gz"))
+ (sha256
+ (base32
+ "02zkfiyklckmivrfvdsrlzvzphkdsgjrz3igncw05dv5pshhq3xx"))))))
+
(define-public check-0.12
- (package/inherit
- check
+ (package
+ (inherit check)
(version "0.12.0")
(source (origin
(method url-fetch)
(base32
"0d22h8xshmbpl9hba9ch3xj8vb9ybm5akpsbbh7yj07fic4h2hj6"))))))
+(define-public clitest
+ (package
+ (name "clitest")
+ (version "0.3.0")
+ (home-page "https://github.com/aureliojargas/clitest")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0zw5wra9hc717srmcar1wm4i34kyj8c49ny4bb7y3nrvkjp2pdb5"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; This package is distributed as a single shell script and comes
+ ;; without a proper build system.
+ (delete 'configure)
+ (delete 'build)
+ (replace 'check
+ (lambda _
+ (substitute* "test.md"
+ ;; One test looks for an error from grep in the form "grep: foo",
+ ;; but our grep returns the absolute file name on errors. Adjust
+ ;; the test to cope with that.
+ (("sed 's/\\^e\\*grep: \\.\\*/")
+ "sed 's/.*e*grep: .*/"))
+
+ (setenv "HOME" "/tmp")
+ (invoke "./clitest" "test.md")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file "clitest" (string-append out "/bin"))
+ (install-file "README.md"
+ (string-append out "/share/doc/clitest-" ,version))
+ #t))))))
+ (native-inputs
+ `(("perl" ,perl))) ;for tests
+ (synopsis "Command line test tool")
+ (description
+ "@command{clitest} is a portable shell script that performs automatic
+testing of Unix command lines.")
+ (license license:expat)))
+
(define-public cunit
(package
(name "cunit")
(define-public cppunit
(package
(name "cppunit")
- (version "1.14.0")
+ (version "1.15.1")
(source (origin
(method url-fetch)
(uri (string-append "http://dev-www.libreoffice.org/src/"
name "-" version ".tar.gz"))
(sha256
(base32
- "1027cyfx5gsjkdkaf6c2wnjh68882grw8n672018cj3vs9lrhmix"))))
+ "19qpqzy66bq76wcyadmi3zahk5v1ll2kig1nvg96zx9padkcdic9"))))
;; Explicitly link with libdl. This is expected to be done by packages
;; relying on cppunit for their tests. However, not all of them do.
;; If we added the linker flag to such packages, we would pollute all
supervised tests.")
(license license:lgpl2.1))) ; no copyright notices. LGPL2.1 is in the tarball
+(define-public shunit2
+ (package
+ (name "shunit2")
+ (version "2.1.8")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kward/shunit2")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "08vs0jjl3pfh100sjlw31x4638xj7fghr0j2g1zfikba8n1f9491"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ; no configure script
+ (delete 'build)
+ (add-after 'patch-source-shebangs 'patch-more-shebangs
+ (lambda _
+ (substitute* "shunit2"
+ (("#! /bin/sh") (string-append "#! " (which "sh")))
+ (("/usr/bin/od") (which "od")))
+ (substitute* "test_runner"
+ (("/bin/sh") (which "sh"))
+ (("/bin/bash") (which "bash")))
+ #t))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; This test is buggy in the build container.
+ (delete-file "shunit2_misc_test.sh")
+ (invoke "sh" "test_runner"))
+ #t))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (install-file "shunit2"
+ (string-append (assoc-ref outputs "out")
+ "/bin"))
+ #t)))))
+ (home-page "https://github.com/kward/shunit2")
+ (synopsis "@code{xUnit} based unit testing for Unix shell scripts")
+ (description "@code{shUnit2} was originally developed to provide a
+consistent testing solution for @code{log4sh}, a shell based logging framework
+similar to @code{log4j}. It is designed to work in a similar manner to JUnit,
+PyUnit and others.")
+ (license license:asl2.0)))
+
;; When dependent packages upgraded to use newer version of catch, this one should
;; be removed.
(define-public catch-framework
(define-public catch-framework2
(package
(name "catch2")
- (version "2.1.2")
+ (version "2.13.2")
(home-page "https://github.com/catchorg/Catch2")
(source (origin
(method git-fetch)
(file-name (git-file-name name version))
(sha256
(base32
- "14vcckqmbydjsg40ngi6iv999zimysh2l7fmrqj1d7xl990qz233"))))
+ "100r0kmra8jmra2hv92lzvwcmphpaiccwvq3lpdsa5b7hailhach"))))
(build-system cmake-build-system)
(inputs
`(("python" ,python-wrapper)))
(define-public cppcheck
(package
(name "cppcheck")
- (version "1.90")
+ (version "2.3")
(source (origin
(method git-fetch)
(uri (git-reference
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "0h7ir2x0k005fm586dxmaphgv5cyz25k3k4sh02p7zb78gzx398h"))))
+ (base32 "03ic5mig3ryzkf85r95ryagf84s7y5nd6sqr915l3zj30apnifvz"))))
(build-system cmake-build-system)
(arguments
'(#:configure-flags '("-DBUILD_TESTS=ON")))
(define-public doctest
(package
(name "doctest")
- (version "2.3.7")
+ (version "2.4.6")
(home-page "https://github.com/onqtam/doctest")
(source (origin
(method git-fetch)
(file-name (git-file-name name version))
(sha256
(base32
- "134lx7pjnglrl4wdmyr9dz3rjb6d4ir6rvapg00gp52n44dbhnrq"))))
+ "14m3q6d96zg6d99x1152jkly50gdjrn5ylrbhax53pfgfzzc5yqx"))))
(build-system cmake-build-system)
(synopsis "C++ test framework")
(description
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/go-check/check.git")
+ (url "https://github.com/go-check/check")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/google/googletest.git")
+ (url "https://github.com/google/googletest")
(commit (string-append "release-" version))))
(file-name (git-file-name name version))
(sha256
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/google/googletest.git")
+ (url "https://github.com/google/googletest")
(commit (string-append "release-" version))))
(file-name (git-file-name "googletest" version))
(sha256
(define-public python-parameterized
(package
(name "python-parameterized")
- (version "0.7.3")
+ (version "0.7.4")
(source
(origin
(method url-fetch)
(uri (pypi-uri "parameterized" version))
(sha256
- (base32
- "0g1q6n7fkanjv7i1djzw62f46xf573jvza7afabh3baqjqxy7rpd"))))
+ (base32 "1444fdz5bj0k10nmhxv0bv2gfrfisi7hfzqdndb0pvhf4g3qq3qr"))))
(build-system python-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
(define-public python2-mock
(let ((base (package-with-python2
(strip-python2-variant python-mock))))
- (package (inherit base)
+ (package/inherit base
(propagated-inputs
`(("python2-functools32" ,python2-functools32)
("python2-funcsigs" ,python2-funcsigs)
(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
(inherit (strip-python2-variant python-pytest))
(name "python2-pytest")
- (version "4.6.9")
+ (version "4.6.11")
(source (origin
(method url-fetch)
(uri (pypi-uri "pytest" version))
(sha256
(base32
- "0fgkmpc31nzy97fxfrkqbzycigdwxwwmninx3qhkzp81migggs0r"))))
+ "0ls3pqr86xgif6bphsb6wrww9r2vc7p7a2naq8zcq8115wwq5yjh"))))
(build-system python-build-system)
(arguments
`(#:python ,python-2
(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
(define-public python2-pytest-cov
(package-with-python2 python-pytest-cov))
+(define-public python-pytest-httpserver
+ (package
+ (name "python-pytest-httpserver")
+ (version "1.0.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest_httpserver" version))
+ (sha256
+ (base32
+ "0vbls0j570l5my83j4jnk5blmnir44i0w511azlh41nl6k8rac5f"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (propagated-inputs
+ `(("python-werkzeug" ,python-werkzeug)))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'fix-library-loading
+ (lambda _
+ (setenv "PYTHONPATH" (string-append (getenv "PYTHONPATH") ":."))))
+ (replace 'check
+ (lambda _
+ (invoke "pytest" "tests" "-vv")
+ (invoke "pytest" "tests" "-vv" "--ssl"))))))
+ (home-page "https://github.com/csernazs/pytest-httpserver")
+ (synopsis "HTTP server for pytest")
+ (description "Pytest plugin library to test http clients without
+contacting the real http server.")
+ (license license:expat)))
+
(define-public python-pytest-runner
(package
(name "python-pytest-runner")
(define-public python2-pytest-runner-2
(package-with-python2 python-pytest-runner-2))
+(define-public python-pytest-lazy-fixture
+ (package
+ (name "python-pytest-lazy-fixture")
+ (version "0.6.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest-lazy-fixture" version))
+ (sha256
+ (base32 "1b0hmnsxw4s2wf9pks8dg6dfy5cx3zcbzs8517lfccxsfizhqz8f"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Make the installed plugin discoverable by Pytest.
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "-vv"))))))
+ (propagated-inputs
+ `(("python-pytest" ,python-pytest)))
+ (home-page "https://github.com/tvorog/pytest-lazy-fixture")
+ (synopsis "Use fixtures in @code{pytest.mark.parametrize}")
+ (description "This plugin helps to use fixtures in
+@code{pytest.mark.parametrize}.")
+ (license license:expat)))
+
(define-public python-pytest-mock
(package
(name "python-pytest-mock")
(define-public python2-pytest-mock
(let ((base (package-with-python2
(strip-python2-variant python-pytest-mock))))
- (package (inherit base)
+ (package/inherit base
(propagated-inputs
`(("python2-mock" ,python2-mock)
,@(package-propagated-inputs base))))))
(define-public python-pytest-xdist
(package
(name "python-pytest-xdist")
- (version "1.25.0")
+ (version "2.1.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-xdist" version))
(sha256
(base32
- "1d812apvcmshh2l8f38spqwb3bpp0x43yy7lyfpxxzc99h4r7y4n"))
+ "0wh6pn66nncfs6ay0n863bgyriwsgppn8flx5l7551j1lbqkinc2"))
(modules '((guix build utils)))
(snippet
'(begin
`(("python-pytest" ,python-pytest)))
(native-inputs
`(("python-pexpect" ,python-pexpect)))
- (home-page "http://bitbucket.org/pytest-dev/pytest-timeout/")
+ (home-page "https://github.com/pytest-dev/pytest-timeout")
(synopsis "Plugin for py.test to abort hanging tests")
(description
"This package provides a py.test plugin that aborts hanging tests after a
"This package is only for bootstrapping. Do not use this.")
(license license:psfl)))
-(define-public python2-testtools-bootstrap
- (package-with-python2 python-testtools-bootstrap))
-
(define-public python-testtools
(package
(inherit python-testtools-bootstrap)
provide matchers, more debugging information, and cross-Python
compatibility.")))
-(define-public python2-testtools
- (package-with-python2 python-testtools))
-
(define-public python-testscenarios-bootstrap
(package
(name "python-testscenarios-bootstrap")
"This package is only for bootstrapping. Don't use this.")
(license (list license:bsd-3 license:asl2.0)))) ; at the user's option
-(define-public python2-testscenarios-bootstrap
- (package-with-python2 python-testscenarios-bootstrap))
-
(define-public python-testscenarios
(package
(inherit python-testscenarios-bootstrap)
"Testscenarios provides clean dependency injection for Python unittest
style tests.")))
-(define-public python2-testscenarios
- (package-with-python2 python-testscenarios))
-
;; Testresources requires python-pbr at runtime, but pbr needs it for its
;; own tests. Hence this bootstrap variant.
(define-public python-testresources-bootstrap
testresources package instead.")
(license (list license:bsd-3 license:asl2.0)))) ; at the user's option
-(define-public python2-testresources-bootstrap
- (package-with-python2 python-testresources-bootstrap))
-
(define-public python-testresources
(package
(inherit python-testresources-bootstrap)
"Testresources is an extension to Python's unittest to allow declarative
use of resources by test cases.")))
-(define-public python2-testresources
- (package-with-python2 python-testresources))
-
(define-public python-subunit-bootstrap
(package
(name "python-subunit-bootstrap")
- (version "1.3.0")
+ (version "1.4.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "python-subunit" version))
(sha256
(base32
- "1fsw8rsn1s3nklx06mayrg5rn2zbky6wwjc5z07s7rf1wjzfs1wn"))))
+ "0j0ymmnc5nfxi1qzvy59j27viqca7l7xd0y9x29g7yr0h693j804"))))
(build-system python-build-system)
(propagated-inputs
`(("python-extras" ,python-extras)
python-subunit package instead.")
(license (list license:bsd-3 license:asl2.0)))) ; at the user's option
-(define-public python2-subunit-bootstrap
- (package-with-python2 python-subunit-bootstrap))
-
(define-public python-subunit
(package
(inherit python-subunit-bootstrap)
"Python-subunit is a Python implementation of the subunit test streaming
protocol.")))
-(define-public python2-subunit
- (package-with-python2 python-subunit))
-
;; Fixtures requires python-pbr at runtime, but pbr uses fixtures for its
;; own tests. Hence this bootstrap variant.
(define-public python-fixtures-bootstrap
python-fixtures package instead.")
(license (list license:bsd-3 license:asl2.0)))) ; at user's option
-(define-public python2-fixtures-bootstrap
- (package-with-python2 python-fixtures-bootstrap))
-
(define-public python-fixtures
(package
(inherit python-fixtures-bootstrap)
"Fixtures provides a way to create reusable state, useful when writing
Python tests.")))
-(define-public python2-fixtures
- (package-with-python2 python-fixtures))
-
(define-public python-testrepository-bootstrap
(package
(name "python-testrepository-bootstrap")
"Bootstrap package for python-testrepository. Don't use this.")
(license (list license:bsd-3 license:asl2.0)))) ; at user's option
-(define-public python2-testrepository-bootstrap
- (package-with-python2 python-testrepository-bootstrap))
-
(define-public python-testrepository
(package
(inherit python-testrepository-bootstrap)
be used as part of a developer's workflow to check things such as what tests
have failed since the last commit or what tests are currently failing.")))
-(define-public python2-testrepository
- (package-with-python2 python-testrepository))
-
(define-public python-coverage
(package
(name "python-coverage")
- (version "5.0.3")
+ (version "5.2.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "coverage" version))
(sha256
(base32
- "1vrg8panqw79pswg52ygbrff3wdnxarrd9qz6c64ah0c4h2cmbvp"))))
+ "16z8i18msgs8k74n73dj9x49wzkl0vk4vq8k5pl1bsj70y7b4k53"))))
(build-system python-build-system)
(arguments
;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
'(#:tests? #f))
- (home-page "http://nedbatchelder.com/code/coverage")
+ (home-page "https://coverage.readthedocs.io")
(synopsis "Code coverage measurement for Python")
(description
"Coverage measures code coverage, typically during test execution. It
(define-public python2-coverage
(package-with-python2 python-coverage))
+(define-public python-pytest-asyncio
+ (package
+ (name "python-pytest-asyncio")
+ (version "0.10.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest-asyncio" version))
+ (sha256
+ (base32 "1bysy4nii13bm7h345wxf8fxcjhab7l374pqdv7vwv3izl053b4z"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-coverage" ,python-coverage)
+ ("python-async-generator" ,python-async-generator)
+ ("python-hypothesis" ,python-hypothesis)
+ ("python-pytest" ,python-pytest)))
+ (home-page "https://github.com/pytest-dev/pytest-asyncio")
+ (synopsis "Pytest support for asyncio")
+ (description "Python asyncio code is usually written in the form of
+coroutines, which makes it slightly more difficult to test using normal
+testing tools. @code{pytest-asyncio} provides useful fixtures and markers
+to make testing async code easier.")
+ (license license:asl2.0)))
+
(define-public python-cov-core
(package
(name "python-cov-core")
(propagated-inputs
`(("python-coverage" ,python-coverage)
("python-requests" ,python-requests)))
- (home-page "http://github.com/codecov/codecov-python")
+ (home-page "https://github.com/codecov/codecov-python")
(synopsis "Upload code coverage reports to @code{codecov.io}")
(description
"Codecov collects code coverage reports from code written in Python, Java,
(define-public python-testpath
(package
(name "python-testpath")
- (version "0.2")
+ (version "0.4.4")
(source
(origin
(method git-fetch)
(file-name (git-file-name name version))
(sha256
(base32
- "0r4iiizjql6ny1ln7ciw7rrbjadz1s9zrf2hl0xkgnh3ypd8936f"))))
+ "1fwv4d3p54xx1x942s104irr35lszvv6jnr4nn1scsfvc0m1qmbk"))))
(build-system python-build-system)
(arguments
`(#:tests? #f ; this package does not even have a setup.py
(srfi srfi-1))
#:phases
(modify-phases %standard-phases
- (delete 'install)
(replace 'build
+ (lambda _
+ ;; A ZIP archive should be generated, but it fails with "ZIP does
+ ;; not support timestamps before 1980". Luckily,
+ ;; SOURCE_DATE_EPOCH is respected, which we set to some time in
+ ;; 1980.
+ (setenv "SOURCE_DATE_EPOCH" "315532800")
+ (invoke "flit" "build")))
+ (replace 'install
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((version (last
- (string-split (assoc-ref inputs "python") #\-)))
- (x.y (string-join (take (string-split version #\.) 2)
- "."))
- (dir (string-append
- (assoc-ref outputs "out")
- "/lib/python" x.y "/site-packages/testpath")))
- (mkdir-p dir)
- (copy-recursively "testpath" dir))
- #t)))))
+ (add-installed-pythonpath inputs outputs)
+ (let ((out (assoc-ref outputs "out")))
+ (for-each (lambda (wheel)
+ (format #true wheel)
+ (invoke "python" "-m" "pip" "install"
+ wheel (string-append "--prefix=" out)))
+ (find-files "dist" "\\.whl$"))))))))
+ (native-inputs
+ `(("python-flit" ,python-flit)))
(home-page "https://github.com/takluyver/testpath")
(synopsis "Test utilities for code working with files and commands")
(description
(define-public python-pytest-sugar
(package
(name "python-pytest-sugar")
- (version "0.9.2")
+ (version "0.9.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-sugar" version))
(sha256
- (base32
- "1asq7yc4g8bx2sn7yy974mhc9ywvaihasjab4inkirdwn9s7mn7w"))))
+ (base32 "1i0hv3h49zvl62jbiyjag84carbrp3zprqzxffdr291nxavvac0n"))))
(build-system python-build-system)
(propagated-inputs
`(("python-packaging" ,python-packaging)
(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
`(("python2-enum34" ,python2-enum34)
,@(package-propagated-inputs hypothesis))))))
+(define-public python-hypothesmith
+ (package
+ (name "python-hypothesmith")
+ (version "0.1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "hypothesmith" version))
+ (sha256
+ (base32
+ "09331sspknv459xcyn1k0lx5flqlc6gmnwp9370pfvg4kg1zmss6"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-hypothesis" ,python-hypothesis-5.23)
+ ("python-lark-parser" ,python-lark-parser)
+ ("python-libcst" ,python-libcst)))
+ (home-page "https://github.com/Zac-HD/hypothesmith")
+ (synopsis "Strategies for generating Python programs")
+ (description
+ "This package contains hypothesis strategies for generating Python
+programs, something like CSmith, a random generator of C programs.")
+ (license license:mpl2.0)))
+
(define-public python-lit
(package
(name "python-lit")
(define-public python-pytest-flakes
(package
(name "python-pytest-flakes")
- (version "1.0.1")
+ (version "4.0.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "pytest-flakes" version))
(sha256
(base32
- "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
+ "0045h3hnrkn2jwr42jgy2j98npx4amwr6wxzi9j0nppaqz33l49p"))))
(build-system python-build-system)
(arguments
`(#:phases
;; It's easier to run tests after install.
;; Make installed package available for running the tests
(add-installed-pythonpath inputs outputs)
- (invoke "py.test" "-vv"))))))
+ (invoke "py.test" "-vv" "-k" "not test_syntax_error"))))))
(native-inputs
`(("python-coverage" ,python-coverage)
("python-pytest" ,python-pytest)
statements in the module it tests.")
(license license:gpl3+)))
-;; Further releases, up to 2.4.3, have failing unit tests. See:
-;; https://github.com/PyCQA/pylint/issues/3198.
(define-public python-pylint
(package
(name "python-pylint")
- (version "2.3.1")
+ (version "2.5.3")
(source
(origin
(method git-fetch)
(commit (string-append "pylint-" version))))
(file-name (git-file-name name version))
(sha256
- (base32
- "17vvzbcqmkhr4icq5p3737nbiiyj1y3g1pa08n9mb1bsnvxmqq0z"))))
+ (base32 "04cgbh2z1mygar63plzziyz34yg6bdr4i0g63jp256fgnqwb1bi3"))))
(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-astroid" ,python-astroid)
("python-isort" ,python-isort)
("python-mccabe" ,python-mccabe)
- ("python-six" ,python-six)))
+ ("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
errors")
all on a minimally sized program. It's highly configurable and handle
pragmas to control it from within your code. Additionally, it is
possible to write plugins to add your own checks.")
- (properties `((python2-variant . ,(delay python2-pylint))))
(license license:gpl2+)))
-;; Python2 is not supported anymore by Pylint. See:
-;; https://github.com/PyCQA/pylint/issues/1763.
-(define-public python2-pylint
- (let ((pylint (package-with-python2
- (strip-python2-variant python-pylint))))
- (package (inherit pylint)
- (version "1.9.5")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/PyCQA/pylint")
- (commit (string-append "pylint-" version))))
- (file-name (git-file-name (package-name pylint) version))
- (sha256
- (base32
- "02a89d8a47s7nfiv1ady3j0sg2sbyja3np145brarfp5x9qxz9x2"))))
- (arguments
- `(,@(package-arguments pylint)
- #:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda _
- ;; Somehow, tests fail if run from the build directory.
- (let ((work "/tmp/work"))
- (mkdir-p work)
- (setenv "PYTHONPATH"
- (string-append (getenv "PYTHONPATH") ":" work))
- (copy-recursively "." work)
- (with-directory-excursion "/tmp"
- (invoke "python" "-m" "unittest" "discover"
- "-s" (string-append work "/pylint/test")
- "-p" "*test_*.py"))))))))
- (native-inputs
- `(("python2-futures" ,python2-futures)
- ,@(package-native-inputs pylint)))
- (propagated-inputs
- `(("python2-backports-functools-lru-cache"
- ,python2-backports-functools-lru-cache)
- ("python2-configparser" ,python2-configparser)
- ,@(package-propagated-inputs pylint))))))
-
(define-public python-paramunittest
(package
(name "python-paramunittest")
(propagated-inputs
`(("python-coverage" ,python-coverage)
("python-nose" ,python-nose)))
- (home-page "http://github.com/cmheisel/nose-xcover")
+ (home-page "https://github.com/cmheisel/nose-xcover")
(synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
(description "Nose-xcover is a companion to the built-in
@code{nose.plugins.cover}. This plugin will write out an XML coverage report
JSON APIs with Behave.")
(license license:expat)))
-(define-public python2-behave-web-api
- (package-with-python2 python-behave-web-api))
-
(define-public python-rednose
(package
(name "python-rednose")
(define-public umockdev
(package
(name "umockdev")
- (version "0.13.2")
+ (version "0.14.4")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/martinpitt/umockdev/"
"umockdev-" version ".tar.xz"))
(sha256
(base32
- "095v3abc321s584sga04y16lcmdzsdi88h24wcrm78v7vq484g74"))))
+ "0xmi24ckpps32k7hc139psgbsnsf4g106sv4l9m445m46amkxggd"))))
(build-system gnu-build-system)
(arguments
`(#:phases
#t)))))
(native-inputs
`(("vala" ,vala)
- ("gtk-doc" ,gtk-doc)
+ ("gobject-introspection" ,gobject-introspection)
+ ("gtk-doc" ,gtk-doc/stable)
("pkg-config" ,pkg-config)
;; For tests.
(define-public python-aiounittest
(package
(name "python-aiounittest")
- (version "1.3.1")
+ (version "1.4.0")
+ ;; Pypi package lacks tests.
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "aiounittest" version))
- (sha256
- (base32
- "1q4bhmi80smaa1lknvdna0sx3915naczlfna1fp435nf6cjyrjl1"))))
+ (origin (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kwarunek/aiounittest.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0hql5mw62lclrpblbh7xvinwjfcdcfvhhlvl7xlq2hi9isjq1c8r"))))
(build-system python-build-system)
+ (arguments
+ '(#:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (invoke "nosetests" "-v")
+ (format #t "test suite not run~%"))
+ #t)))))
+ (propagated-inputs `(("python-wrapt" ,python-wrapt)))
(native-inputs
`(("python-coverage" ,python-coverage)
("python-nose" ,python-nose)))