gnu: Add python-doc8.
[jackhill/guix/guix.git] / gnu / packages / check.scm
index a9b38f3..5f3073d 100644 (file)
@@ -16,7 +16,7 @@
 ;;; 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 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020 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, 2019 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2017 ng0 <ng0@n0.is>
 ;;; Copyright © 2015, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; 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 Chris Marusich <cmmarusich@gmail.com>
+;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -78,7 +79,7 @@
 (define-public check
   (package
     (name "check")
-    (version "0.13.0")
+    (version "0.14.0")
     (source
      (origin
       (method url-fetch)
@@ -86,7 +87,7 @@
                           version "/check-" version ".tar.gz"))
       (sha256
        (base32
-        "02crar51gniijrrl9p8f9maibnwc33n76kw5cqr7xk3s8hqnncy4"))))
+        "02zkfiyklckmivrfvdsrlzvzphkdsgjrz3igncw05dv5pshhq3xx"))))
     (build-system gnu-build-system)
     (home-page "https://libcheck.github.io/check/")
     (synopsis "Unit test framework for C")
@@ -99,6 +100,19 @@ faults or other signals.  The output from unit tests can be used within
 source code editors and IDEs.")
     (license license:lgpl2.1+)))
 
+;; Some packages require this older version.  Removed once no longer needed.
+(define-public check-0.12
+  (package/inherit
+   check
+   (version "0.12.0")
+   (source (origin
+             (method url-fetch)
+             (uri (string-append "https://github.com/libcheck/check/releases"
+                                 "/download/" version "/check-" version ".tar.gz"))
+             (sha256
+              (base32
+               "0d22h8xshmbpl9hba9ch3xj8vb9ybm5akpsbbh7yj07fic4h2hj6"))))))
+
 (define-public cunit
   (package
     (name "cunit")
@@ -196,7 +210,7 @@ supervised tests.")
 multi-paradigm automated test framework for C++ and Objective-C.")
     (license license:boost1.0)))
 
-(define-public catch-framework2
+(define-public catch-framework2-1
   (package
     (name "catch2")
     (version "1.12.2")
@@ -216,6 +230,28 @@ multi-paradigm automated test framework for C++ and Objective-C.")
 a multi-paradigm automated test framework for C++ and Objective-C.")
     (license license:boost1.0)))
 
+(define-public catch-framework2
+  (package
+    (name "catch2")
+    (version "2.1.2")
+    (home-page "https://github.com/catchorg/Catch2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/catchorg/Catch2")
+                     (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "14vcckqmbydjsg40ngi6iv999zimysh2l7fmrqj1d7xl990qz233"))))
+    (build-system cmake-build-system)
+    (inputs
+     `(("python" ,python-wrapper)))
+    (synopsis "Automated test framework for C++ and Objective-C")
+    (description "Catch2 stands for C++ Automated Test Cases in Headers and is
+a multi-paradigm automated test framework for C++ and Objective-C.")
+    (license license:boost1.0)))
+
 (define-public cmdtest
   (package
     (name "cmdtest")
@@ -288,7 +324,7 @@ format.")
 (define-public cppcheck
   (package
     (name "cppcheck")
-    (version "1.89")
+    (version "1.90")
     (source (origin
       (method git-fetch)
       (uri (git-reference
@@ -296,7 +332,7 @@ format.")
              (commit version)))
       (file-name (git-file-name name version))
       (sha256
-       (base32 "07yn1zycsb7sn1v7fprihbl0ih4n2zkd7l9jvmkjcskvwn4n21h0"))))
+       (base32 "0h7ir2x0k005fm586dxmaphgv5cyz25k3k4sh02p7zb78gzx398h"))))
     (build-system cmake-build-system)
     (arguments
      '(#:configure-flags '("-DBUILD_TESTS=ON")))
@@ -357,7 +393,7 @@ and it supports a very flexible form of test discovery.")
 (define-public doctest
   (package
     (name "doctest")
-    (version "2.3.5")
+    (version "2.3.7")
     (home-page "https://github.com/onqtam/doctest")
     (source (origin
               (method git-fetch)
@@ -365,7 +401,7 @@ and it supports a very flexible form of test discovery.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0rddlzhnv0f5036q0m0p019pismka7sx6x8cnzk65sk77b1dsbhg"))))
+                "134lx7pjnglrl4wdmyr9dz3rjb6d4ir6rvapg00gp52n44dbhnrq"))))
     (build-system cmake-build-system)
     (synopsis "C++ test framework")
     (description
@@ -483,7 +519,7 @@ test coverage and has a web user interface that will refresh automatically.")
 (define-public googletest
   (package
     (name "googletest")
-    (version "1.8.1")
+    (version "1.10.0")
     (source
      (origin
        (method git-fetch)
@@ -492,7 +528,7 @@ test coverage and has a web user interface that will refresh automatically.")
              (commit (string-append "release-" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0270msj6n7mggh4xqqjp54kswbl7mkcc8px1p5dqdpmw5ngh9fzk"))))
+        (base32 "1zbmab9295scgg4z2vclgfgjchfjailjnvzc6f5x9jvlsdi3dpwz"))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
@@ -505,6 +541,20 @@ discovery, death tests, assertions, parameterized tests and XML test report
 generation.")
     (license license:bsd-3)))
 
+(define-public googletest-1.8
+  (package/inherit
+   googletest
+   (version "1.8.1")
+   (source (origin
+             (method git-fetch)
+             (uri (git-reference
+                   (url "https://github.com/google/googletest.git")
+                   (commit (string-append "release-" version))))
+             (file-name (git-file-name "googletest" version))
+             (sha256
+              (base32
+               "0270msj6n7mggh4xqqjp54kswbl7mkcc8px1p5dqdpmw5ngh9fzk"))))))
+
 (define-public cpputest
   (package
     (name "cpputest")
@@ -531,25 +581,43 @@ but it works for any C/C++ project.")
 (define-public python-parameterized
   (package
     (name "python-parameterized")
-    (version "0.6.1")
+    (version "0.7.3")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "parameterized" version))
        (sha256
         (base32
-         "1qj1939shm48d9ql6fm1nrdy4p7sdyj8clz1szh5swwpf1qqxxfa"))))
+         "0g1q6n7fkanjv7i1djzw62f46xf573jvza7afabh3baqjqxy7rpd"))))
     (build-system python-build-system)
-    (arguments '(#:tests? #f)) ; there are no tests
+    (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)))))
+    (native-inputs
+     `(("python-mock" ,python-mock)
+       ("python-nose" ,python-nose)))
     (home-page "https://github.com/wolever/parameterized")
     (synopsis "Parameterized testing with any Python test framework")
     (description
      "Parameterized is a Python library that aims to fix parameterized testing
 for every Python test framework.  It supports nose, py.test, and unittest.")
+    (properties `((python2-variant . ,(delay python2-parameterized))))
     (license license:bsd-2)))
 
 (define-public python2-parameterized
-  (package-with-python2 python-parameterized))
+  (let ((base (package-with-python2 (strip-python2-variant
+                                     python-parameterized))))
+    (package/inherit
+     base
+     (source
+      (origin
+        (inherit (package-source base))
+        (patches (search-patches "python2-parameterized-docstring-test.patch")))))))
 
 (define-public python-minimock
   (package
@@ -639,14 +707,14 @@ have been used.")
 (define-public python-nose2
   (package
     (name "python-nose2")
-    (version "0.6.5")
+    (version "0.9.2")
       (source
         (origin
           (method url-fetch)
           (uri (pypi-uri "nose2" version))
           (sha256
            (base32
-            "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
+            "0pmbb6nk31yhgh4zkcblzxsznml7f7pf5q1ihgrwvbxv4mwzfql7"))))
     (build-system python-build-system)
     (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
     (propagated-inputs
@@ -689,7 +757,7 @@ interfaces and processes.")
     (propagated-inputs
      `(("python-six" ,python-six)
        ("python-traceback2" ,python-traceback2)))
-    (home-page "http://pypi.python.org/pypi/unittest2")
+    (home-page "https://pypi.org/project/unittest2/")
     (synopsis "Python unit testing library")
     (description
      "Unittest2 is a replacement for the unittest module in the Python
@@ -940,17 +1008,26 @@ result back.")
 (define-public python-pytest-timeout
   (package
     (name "python-pytest-timeout")
-    (version "1.3.3")
+    (version "1.3.4")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pytest-timeout" version))
        (sha256
         (base32
-         "1cczcjhw4xx5sjkhxlhc5c1bkr7x6fcyx12wrnvwfckshdvblc2a"))))
+         "13n42azbvs5slvy2n1a9nw17r4qdq10dd68nln3jp925safa3yl0"))))
     (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)))
+    (native-inputs
+     `(("python-pexpect" ,python-pexpect)))
     (home-page "http://bitbucket.org/pytest-dev/pytest-timeout/")
     (synopsis "Plugin for py.test to abort hanging tests")
     (description
@@ -958,6 +1035,31 @@ result back.")
 timeout has been exceeded.")
     (license license:expat)))
 
+(define-public python-pytest-forked
+  (package
+    (name "python-pytest-forked")
+    (version "1.1.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-forked" version))
+       (sha256
+        (base32
+         "000i4q7my2fq4l49n8idx2c812dql97qv6qpm2vhrrn9v6g6j18q"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-pytest" ,python-pytest)))
+    (native-inputs
+     `(("python-setuptools-scm" ,python-setuptools-scm)))
+    (home-page
+     "https://github.com/pytest-dev/pytest-forked")
+    (synopsis
+     "Run tests in isolated forked subprocesses")
+    (description
+     "Pytest plugin which will run each test in a subprocess and will report if
+a test crashed the process.")
+    (license license:expat)))
+
 (define-public python-scripttest
   (package
     (name "python-scripttest")
@@ -972,7 +1074,8 @@ timeout has been exceeded.")
     (build-system python-build-system)
     (native-inputs
      `(("python-pytest" ,python-pytest)))
-    (home-page "http://pythonpaste.org/scripttest/")
+    (home-page (string-append "https://web.archive.org/web/20161029233413/"
+                              "http://pythonpaste.org/scripttest/"))
     (synopsis "Python library to test command-line scripts")
     (description "Scripttest is a Python helper library for testing
 interactive command-line applications.  With it you can run a script in a
@@ -1373,8 +1476,6 @@ C/C++, R, and more, and uploads it to the @code{codecov.io} service.")
        #:modules ((guix build python-build-system)
                   (guix build utils)
                   (srfi srfi-1))
-       #:imported-modules (,@%python-build-system-modules
-                           (srfi srfi-1))
        #:phases
        (modify-phases %standard-phases
          (delete 'install)
@@ -1474,7 +1575,7 @@ the last py.test invocation.")
     (synopsis "Py.test plugin to test server connections locally")
     (description "Pytest-localserver is a plugin for the pytest testing
 framework which enables you to test server connections locally.")
-    (home-page "https://pypi.python.org/pypi/pytest-localserver")
+    (home-page "https://pypi.org/project/pytest-localserver/")
     (license license:expat)))
 
 (define-public python-pytest-xprocess
@@ -1802,8 +1903,8 @@ possible to write plugins to add your own checks.")
     (synopsis
      "Simple extension to have parametrized unit tests")
     (description
-     "This package allows to create parametrized unit-tests that work with the standard
-unittest package.  A parametrized test case is automatically converted to multiple test
+     "This package creates parameterized unit-tests that work with the standard
+unittest package.  A parameterized test case is automatically converted to multiple test
 cases.  Since they are TestCase subclasses, they work with other test suites that
 recognize TestCases.")
     (license license:bsd-2)))
@@ -1928,7 +2029,7 @@ especially -cover-package.")
         (base32
          "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
     (build-system python-build-system)
-    (home-page "http://pypi.python.org/pypi/discover/")
+    (home-page "https://pypi.org/project/discover/")
     (synopsis
      "Python test discovery for unittest")
     (description
@@ -1962,7 +2063,15 @@ backported from Python 2.7 for Python 2.4+.")
        ("python-parse" ,python-parse)
        ("python-parse-type" ,python-parse-type)))
     (arguments
-     '(#:test-target "behave_test"))
+     '(#: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)))))
     (home-page "https://github.com/behave/behave")
     (synopsis "Python behavior-driven development")
     (description
@@ -2042,6 +2151,32 @@ JSON APIs with Behave.")
 (define-public python2-rednose
   (package-with-python2 python-rednose))
 
+(define-public python-nose-random
+  (package
+    (name "python-nose-random")
+    (version "1.0.0")
+    (source
+     (origin
+      (method git-fetch)
+      (uri (git-reference
+            (url "https://github.com/fzumstein/nose-random")
+            (commit version)))
+      (file-name (git-file-name name version))
+      (sha256
+       (base32
+        "1dvip61r2frjv35mv6mmfjc07402z73pjbndfp3mhxyjn2zhksw2"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-nose" ,python-nose)))
+    (home-page "https://github.com/fzumstein/nose-random")
+    (synopsis "Nose plugin to facilitate randomized unit testing with
+Python")
+    (description "Python nose-random is designed to facilitate
+Monte-Carlo style unit testing.  The idea is to improve testing by
+running your code against a large number of randomly generated input
+scenarios.")
+    (license license:expat)))
+
 (define-public python-nose-randomly
   (package
     (name "python-nose-randomly")
@@ -2364,7 +2499,7 @@ grew out of the @dfn{Vc} project.")
 (define-public python-pyfakefs
   (package
     (name "python-pyfakefs")
-    (version "3.5.8")
+    (version "3.7.1")
     (source (origin
               (method url-fetch)
               ;; We use the PyPI URL because there is no proper release
@@ -2373,7 +2508,7 @@ grew out of the @dfn{Vc} project.")
               (uri (pypi-uri "pyfakefs" version))
               (sha256
                (base32
-                "0qb9jp0bqhc0dv0rn805fv99029fvx135f3bvka6scfkcl6jgllc"))
+                "1cp2yw96fa2qkgi39xa3nlr3inf8wb5rgh9kdq53256ca2r8pdhy"))
               (patches (search-patches
                         "python-pyfakefs-remove-bad-test.patch"))
               (file-name (string-append name "-" version ".tar.gz"))))
@@ -2409,3 +2544,25 @@ system.  The code under test requires no modification to work with pyfakefs.")
 
 (define-public python2-pyfakefs
   (package-with-python2 python-pyfakefs))
+
+(define-public python-aiounittest
+  (package
+    (name "python-aiounittest")
+    (version "1.3.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "aiounittest" version))
+       (sha256
+        (base32
+         "1q4bhmi80smaa1lknvdna0sx3915naczlfna1fp435nf6cjyrjl1"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-coverage" ,python-coverage)
+       ("python-nose" ,python-nose)))
+    (home-page
+     "https://github.com/kwarunek/aiounittest")
+    (synopsis "Test asyncio code more easily")
+    (description "Aiounittest is a library that helps write tests using
+asynchronous code in Python (asyncio).")
+    (license license:expat)))