gnu: Add python-pytest-regressions.
[jackhill/guix/guix.git] / gnu / packages / check.scm
index b6ecd37..6374493 100644 (file)
@@ -7,7 +7,7 @@
 ;;; 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, 2020 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>
@@ -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, 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, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2017, 2019 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2017 Nikita <nikita@n0.is>
-;;; Copyright © 2015, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2015, 2017, 2018, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 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>
@@ -36,6 +36,7 @@
 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
 ;;;
 ;;; 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 python-science)
   #:use-module (gnu packages time)
   #:use-module (gnu packages xml)
   #:use-module (guix utils)
@@ -288,6 +291,55 @@ unit testing.  Test output is in XML for automatic testing and GUI based for
 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
@@ -373,39 +425,26 @@ a multi-paradigm automated test framework for C++ and Objective-C.")
 (define-public cmdtest
   (package
     (name "cmdtest")
-    (version "0.32")
+    ;; Use the latest commit (from 2019) in order to get Python 3 support.
+    (version "0.32-14-gcdfe14e")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "http://git.liw.fi/cmdtest/snapshot/"
-                                  name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "git://git.liw.fi/cmdtest/")
+                    (commit version)))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "1jmfiyrrqmpvwdb273bkb8hjaf4rwx9njblx29pmr7giyahskwi5"))))
+                "1yhcwsqcpckkq5kw3h07k0xg6infyiyzq9ni3nqphrzxis7hxjf1"))))
     (build-system python-build-system)
-    (arguments
-     `(#:python ,python-2
-       #:phases
-       (modify-phases %standard-phases
-         ;; check phase needs to be run before the build phase. If not, the
-         ;; coverage test runner looks for tests for the built source files,
-         ;; and fails.
-         (delete 'check)
-         (add-before 'build 'check
-           (lambda _
-             (substitute* "yarn"
-               (("/bin/sh") (which "sh")))
-             ;; yarn uses python2-ttystatus to print messages.
-             ;; python2-ttystatus requires /dev/tty which is not present in
-             ;; the build environment. Hence assuming-failure test fails.
-             (delete-file "yarn.tests/assuming-failure.script")
-             (delete-file "yarn.tests/assuming-failure.stdout")
-             (invoke "python" "setup.py" "check"))))))
+    (arguments `(#:tests? #f))          ;requires Python 2!
     (native-inputs
-     `(("python2-coverage-test-runner" ,python2-coverage-test-runner)))
-    (propagated-inputs
-     `(("python2-cliapp" ,python2-cliapp)
-       ("python2-markdown" ,python2-markdown)
-       ("python2-ttystatus" ,python2-ttystatus)))
+     `(("python-coverage-test-runner" ,python-coverage-test-runner)
+       ("python" ,python)))
+    (inputs
+     `(("python-cliapp" ,python-cliapp)
+       ("python-markdown" ,python-markdown)
+       ("python-ttystatus" ,python-ttystatus)))
     (home-page "https://liw.fi/cmdtest/")
     (synopsis "Black box Unix program tester")
     (description
@@ -442,7 +481,7 @@ format.")
 (define-public cppcheck
   (package
     (name "cppcheck")
-    (version "1.90")
+    (version "2.3")
     (source (origin
       (method git-fetch)
       (uri (git-reference
@@ -450,7 +489,7 @@ format.")
              (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")))
@@ -511,7 +550,7 @@ and it supports a very flexible form of test discovery.")
 (define-public doctest
   (package
     (name "doctest")
-    (version "2.4.1")
+    (version "2.4.6")
     (home-page "https://github.com/onqtam/doctest")
     (source (origin
               (method git-fetch)
@@ -519,7 +558,7 @@ and it supports a very flexible form of test discovery.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "17g7n6rjs90i0b231x5s934qnr8m80ga2yg1z344bnsdiqcjd63w"))))
+                "14m3q6d96zg6d99x1152jkly50gdjrn5ylrbhax53pfgfzzc5yqx"))))
     (build-system cmake-build-system)
     (synopsis "C++ test framework")
     (description
@@ -660,8 +699,8 @@ generation.")
     (license license:bsd-3)))
 
 (define-public googletest-1.8
-  (package/inherit
-   googletest
+  (package
+    (inherit googletest)
    (version "1.8.1")
    (source (origin
              (method git-fetch)
@@ -786,7 +825,7 @@ have been used.")
 (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)
@@ -1082,6 +1121,37 @@ supports coverage of subprocesses.")
 (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")
@@ -1120,8 +1190,8 @@ supports coverage of subprocesses.")
 ;; python-bleach 3.1.0 requires this ancient version of pytest-runner.
 ;; Remove once no longer needed.
 (define-public python-pytest-runner-2
-  (package/inherit
-   python-pytest-runner
+  (package
+    (inherit python-pytest-runner)
    (version "2.12.2")
    (source (origin
              (method url-fetch)
@@ -1190,7 +1260,7 @@ same arguments.")
 (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))))))
@@ -1269,7 +1339,7 @@ result back.")
      `(("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
@@ -1323,9 +1393,6 @@ interactive command-line applications.  With it you can run a script in a
 subprocess and see the output as well as any file modifications.")
     (license license:expat)))
 
-(define-public python2-scripttest
-  (package-with-python2 python-scripttest))
-
 (define-public python-testtools-bootstrap
   (package
     (name "python-testtools-bootstrap")
@@ -1355,9 +1422,6 @@ subprocess and see the output as well as any file modifications.")
      "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)
@@ -1383,9 +1447,6 @@ subprocess and see the output as well as any file modifications.")
 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")
@@ -1413,9 +1474,6 @@ compatibility.")))
      "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)
@@ -1427,9 +1485,6 @@ compatibility.")))
      "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
@@ -1454,9 +1509,6 @@ style tests.")))
 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)
@@ -1471,9 +1523,6 @@ testresources package instead.")
      "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")
@@ -1500,9 +1549,6 @@ use of resources by test cases.")))
 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)
@@ -1518,9 +1564,6 @@ python-subunit package instead.")
      "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
@@ -1545,9 +1588,6 @@ protocol.")))
 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)
@@ -1570,9 +1610,6 @@ python-fixtures package instead.")
      "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")
@@ -1598,9 +1635,6 @@ Python tests.")))
      "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)
@@ -1618,9 +1652,6 @@ Python tests.")))
 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")
@@ -1724,7 +1755,7 @@ C/C++, R, and more, and uploads it to the @code{codecov.io} service.")
 (define-public python-testpath
   (package
     (name "python-testpath")
-    (version "0.2")
+    (version "0.4.4")
     (source
      (origin
        (method git-fetch)
@@ -1734,7 +1765,7 @@ C/C++, R, and more, and uploads it to the @code{codecov.io} service.")
        (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
@@ -1743,19 +1774,25 @@ C/C++, R, and more, and uploads it to the @code{codecov.io} service.")
                   (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
@@ -1764,9 +1801,6 @@ and commands.  It contains functions to check things on the file system, and
 tools for mocking system commands and recording calls to those.")
     (license license:expat)))
 
-(define-public python2-testpath
-  (package-with-python2 python-testpath))
-
 (define-public python-testlib
   (package
     (name "python-testlib")
@@ -2080,9 +2114,9 @@ failures.")
 (define-public python2-pytest-flakes
   (package-with-python2 python-pytest-flakes))
 
-(define-public python2-coverage-test-runner
+(define-public python-coverage-test-runner
   (package
-    (name "python2-coverage-test-runner")
+    (name "python-coverage-test-runner")
     (version "1.15")
     (source
      (origin
@@ -2096,14 +2130,13 @@ failures.")
          "1kjjb9llckycnfxag8zcvqsn4z1s3dwyw6b1n0avxydihgf30rny"))))
     (build-system python-build-system)
     (arguments
-     `(#:python ,python-2
-       #:phases
+     `(#:phases
        (modify-phases %standard-phases
          (replace 'check
            (lambda _
              (invoke "./testrun"))))))
     (propagated-inputs
-     `(("python2-coverage" ,python2-coverage)))
+     `(("python-coverage" ,python-coverage)))
     (home-page "https://liw.fi/coverage-test-runner/")
     (synopsis "Python module for running unit tests")
     (description "@code{CoverageTestRunner} is a python module for running
@@ -2111,6 +2144,9 @@ unit tests and failing them if the unit test module does not exercise all
 statements in the module it tests.")
     (license license:gpl3+)))
 
+(define-public python2-coverage-test-runner
+  (package-with-python2 python-coverage-test-runner))
+
 (define-public python-pylint
   (package
     (name "python-pylint")
@@ -2149,51 +2185,8 @@ Pylint has many rules enabled by default, way too much to silence them
 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
-              `(,@(strip-keyword-arguments '(#:tests?) (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")
@@ -2422,9 +2415,6 @@ tests written in a natural language style, backed up by Python code.")
 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")
@@ -2764,7 +2754,7 @@ provides a simple way to achieve this.")
     (native-inputs
      `(("vala" ,vala)
        ("gobject-introspection" ,gobject-introspection)
-       ("gtk-doc" ,gtk-doc)
+       ("gtk-doc" ,gtk-doc/stable)
        ("pkg-config" ,pkg-config)
 
        ;; For tests.
@@ -2861,16 +2851,13 @@ under test to interact with a fake file system instead of the real file
 system.  The code under test requires no modification to work with pyfakefs.")
     (license license:asl2.0)))
 
-(define-public python2-pyfakefs
-  (package-with-python2 python-pyfakefs))
-
 ;; This minimal variant is used to avoid a circular dependency between
 ;; python2-importlib-metadata, which requires pyfakefs for its tests, and
 ;; python2-pytest, which requires python2-importlib-metadata.
 (define-public python2-pyfakefs-bootstrap
   (hidden-package
    (package
-     (inherit python2-pyfakefs)
+     (inherit (package-with-python2 python-pyfakefs))
      (name "python2-pyfakefs-bootstrap")
      (native-inputs '())
      (arguments
@@ -2880,15 +2867,27 @@ system.  The code under test requires no modification to work with pyfakefs.")
 (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)))
@@ -2898,3 +2897,83 @@ system.  The code under test requires no modification to work with pyfakefs.")
     (description "Aiounittest is a library that helps write tests using
 asynchronous code in Python (asyncio).")
     (license license:expat)))
+
+(define-public python-pytest-dependency
+  (package
+    (name "python-pytest-dependency")
+    (version "0.5.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "pytest-dependency" version))
+        (sha256
+          (base32
+            "0swl3mxca7nnjbb5grfzrm3fa2750h9vjsha0f2kyrljc6895a62"))))
+    (build-system python-build-system)
+    (propagated-inputs
+      `(("python-pytest" ,python-pytest)))
+    (home-page
+      "https://github.com/RKrahl/pytest-dependency")
+    (synopsis "Manage dependencies of tests")
+    (description "This pytest plugin manages dependencies of tests.  It allows
+to mark some tests as dependent from other tests.  These tests will then be
+skipped if any of the dependencies did fail or has been skipped.")
+    (license license:asl2.0)))
+
+(define-public python-pytest-datadir
+  (package
+    (name "python-pytest-datadir")
+    (version "1.3.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-datadir" version))
+       (sha256
+        (base32
+         "066bg6wlzgq2pqnjp73dfrcmk8951xw3aqcxa3p1axgqimrixbyk"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-setuptools-scm" ,python-setuptools-scm)))
+    (propagated-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-wheel" ,python-wheel)))
+    (home-page "https://github.com/gabrielcnr/pytest-datadir")
+    (synopsis "Pytest plugin for manipulating test data directories and files")
+    (description
+     "This package provides a Pytest plugin for manipulating test data
+directories and files.")
+    (license license:expat)))
+
+(define-public python-pytest-regressions
+  (package
+    (name "python-pytest-regressions")
+    (version "2.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-regressions" version))
+       (sha256
+        (base32
+         "05jpsvv8rj8i4x24fphpnar5dl4s6d6bw6ikjk5d8v96rdviz9qm"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-pytest-datadir" ,python-pytest-datadir)
+       ("python-pyyaml" ,python-pyyaml)))
+    (native-inputs
+     `(("python-matplotlib" ,python-matplotlib)
+       ("python-numpy" ,python-numpy)
+       ("python-pandas" ,python-pandas)
+       ("python-pillow" ,python-pillow)
+       ("python-pre-commit" ,python-pre-commit)
+       ("python-restructuredtext-lint"
+        ,python-restructuredtext-lint)
+       ("python-tox" ,python-tox)
+       ("python-setuptools-scm" ,python-setuptools-scm)
+       ("python-pytest" ,python-pytest)))
+    (home-page "https://github.com/ESSS/pytest-regressions")
+    (synopsis "Easy to use fixtures to write regression tests")
+    (description
+     "This plugin makes it simple to test general data, images, files, and numeric
+tables by saving expected data in a data directory (courtesy of pytest-datadir)
+that can be used to verify that future runs produce the same data.")
+    (license license:expat)))