gnu: clitest: Use G-expressions.
[jackhill/guix/guix.git] / gnu / packages / check.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2014 David Thompson <davet@gnu.org>
4 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
5 ;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
6 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
7 ;;; Copyright © 2015, 2017 Cyril Roelandt <tipecaml@gmail.com>
8 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
9 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
10 ;;; Copyright © 2015, 2016, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
11 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
12 ;;; Copyright © 2016 Christine Lemmer-Webber <cwebber@dustycloud.org>
13 ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org>
14 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
15 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
16 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
17 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
18 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
19 ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
20 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
21 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
22 ;;; Copyright © 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
23 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
24 ;;; Copyright © 2017, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
25 ;;; Copyright © 2017, 2019 Kei Kebreau <kkebreau@posteo.net>
26 ;;; Copyright © 2017 Nikita <nikita@n0.is>
27 ;;; Copyright © 2015, 2017, 2018, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
28 ;;; Copyright © 2016-2022 Marius Bakke <marius@gnu.org>
29 ;;; Copyright © 2017, 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
30 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
31 ;;; Copyright © 2019, 2021 Pierre Langlois <pierre.langlois@gmx.com>
32 ;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
33 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
34 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
35 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
36 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
37 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
38 ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
39 ;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
40 ;;;
41 ;;; This file is part of GNU Guix.
42 ;;;
43 ;;; GNU Guix is free software; you can redistribute it and/or modify it
44 ;;; under the terms of the GNU General Public License as published by
45 ;;; the Free Software Foundation; either version 3 of the License, or (at
46 ;;; your option) any later version.
47 ;;;
48 ;;; GNU Guix is distributed in the hope that it will be useful, but
49 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
50 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51 ;;; GNU General Public License for more details.
52 ;;;
53 ;;; You should have received a copy of the GNU General Public License
54 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
55
56 (define-module (gnu packages check)
57 #:use-module (gnu packages)
58 #:use-module (gnu packages autotools)
59 #:use-module (gnu packages base)
60 #:use-module (gnu packages bash)
61 #:use-module (gnu packages compression)
62 #:use-module (gnu packages linux)
63 #:use-module (gnu packages llvm)
64 #:use-module (gnu packages glib)
65 #:use-module (gnu packages gnome)
66 #:use-module (gnu packages golang)
67 #:use-module (gnu packages gtk)
68 #:use-module (gnu packages perl)
69 #:use-module (gnu packages pkg-config)
70 #:use-module (gnu packages python)
71 #:use-module (gnu packages python-check)
72 #:use-module (gnu packages python-build)
73 #:use-module (gnu packages python-web)
74 #:use-module (gnu packages python-xyz)
75 #:use-module (gnu packages python-science)
76 #:use-module (gnu packages time)
77 #:use-module (gnu packages xml)
78 #:use-module (guix utils)
79 #:use-module ((guix licenses) #:prefix license:)
80 #:use-module (guix packages)
81 #:use-module (guix download)
82 #:use-module (guix gexp)
83 #:use-module (guix git-download)
84 #:use-module (guix build-system cmake)
85 #:use-module (guix build-system glib-or-gtk)
86 #:use-module (guix build-system gnu)
87 #:use-module (guix build-system go)
88 #:use-module (guix build-system meson)
89 #:use-module (guix build-system python)
90 #:use-module (guix build-system trivial)
91 #:use-module (srfi srfi-1))
92
93 (define-public pedansee
94 (package
95 (name "pedansee")
96 (version "0.0.3")
97 (source
98 (origin
99 (method url-fetch)
100 (uri
101 (string-append "https://www.flyn.org/projects/"
102 name "/" name "-" version ".tar.gz"))
103 (sha256
104 (base32 "0lsg791x6n95pxg6vif8qfc46nqcamhjq3g0dl5xqf6imy7n3acd"))))
105 (build-system glib-or-gtk-build-system)
106 (native-inputs
107 (list clang pkg-config python-wrapper))
108 (inputs
109 (list glib))
110 (synopsis "Code checker for C")
111 (description "Pedansee checks C source files for compliance with a particular
112 programming style. The style is currently defined by the pedansee source code
113 in the form of functions which walk each source file’s syntax tree. You can
114 modify some aspects of this style through the use of regular expressions.")
115 (home-page "https://www.flyn.org/projects/pedansee/")
116 (license license:gpl3+)))
117
118 (define-public mutest
119 (package
120 (name "mutest")
121 (version "0.0.0")
122 (source
123 (origin
124 (method git-fetch)
125 (uri
126 (git-reference
127 (url "https://github.com/ebassi/mutest")
128 (commit "e6246c9")))
129 (file-name (git-file-name name version))
130 (sha256
131 (base32 "0gdqwq6fvk06wld4rhnw5752hahrvhd69zrci045x25rwx90x26q"))))
132 (build-system meson-build-system)
133 (synopsis "Small C testing library")
134 (description "Mutest aims to be a small unit testing library for C projects,
135 with an API heavily modelled on high level Behavior-Driver Development frameworks
136 like Jasmine or Mocha.")
137 (home-page "https://ebassi.github.io/mutest/mutest.md.html")
138 (license license:expat)))
139
140 (define-public check
141 (package
142 (name "check")
143 (version "0.15.2")
144 (source
145 (origin
146 (method url-fetch)
147 (uri (string-append "https://github.com/libcheck/check/releases/download/"
148 version "/check-" version ".tar.gz"))
149 (sha256
150 (base32
151 "02m25y9m46pb6n46s51av62kpd936lkfv3b13kfpckgvmh5lxpm8"))
152 (patches
153 (list
154 ;; This patch fixes some tests that would otherwise fail on
155 ;; powerpc64le-linux. Without this patch, the tests make certain
156 ;; assumptions about floating point number precision that are not true
157 ;; on that platform.
158 ;;
159 ;; TODO: Remove this patch when updating to the next check release,
160 ;; since it will be included there. See:
161 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47698
162 (origin
163 (method url-fetch)
164 (uri
165 (string-append "https://github.com/libcheck/check/commit/"
166 "4fbe702fa4f35bee8a90512f9f59d1441c4ae82e.patch"))
167 (file-name (string-append name
168 "-fix-test-precision-for-ppc.patch"))
169 (sha256
170 (base32
171 "04qg1p9afdd6453k18qskazrvscysdcjz9j6w4i6p5x4xyma19v6")))))))
172 (build-system gnu-build-system)
173 (home-page "https://libcheck.github.io/check/")
174 (synopsis "Unit test framework for C")
175 (description
176 "Check is a unit testing framework for C. It features a simple
177 interface for defining unit tests, putting little in the way of the
178 developer. Tests are run in a separate address space, so Check can
179 catch both assertion failures and code errors that cause segmentation
180 faults or other signals. The output from unit tests can be used within
181 source code editors and IDEs.")
182 (license license:lgpl2.1+)))
183
184 ;; Some packages require older versions. Removed once no longer needed.
185 (define-public check-0.14
186 (package
187 (inherit check)
188 (version "0.14.0")
189 (source (origin
190 (method url-fetch)
191 (uri (string-append "https://github.com/libcheck/check/releases"
192 "/download/" version "/check-" version ".tar.gz"))
193 (sha256
194 (base32
195 "02zkfiyklckmivrfvdsrlzvzphkdsgjrz3igncw05dv5pshhq3xx"))))))
196
197 (define-public check-0.12
198 (package
199 (inherit check)
200 (version "0.12.0")
201 (source (origin
202 (method url-fetch)
203 (uri (string-append "https://github.com/libcheck/check/releases"
204 "/download/" version "/check-" version ".tar.gz"))
205 (sha256
206 (base32
207 "0d22h8xshmbpl9hba9ch3xj8vb9ybm5akpsbbh7yj07fic4h2hj6"))))))
208
209 (define-public clitest
210 (package
211 (name "clitest")
212 (version "0.4.0")
213 (home-page "https://github.com/aureliojargas/clitest")
214 (source (origin
215 (method git-fetch)
216 (uri (git-reference (url home-page) (commit version)))
217 (file-name (git-file-name name version))
218 (sha256
219 (base32
220 "1p745mxiq3hgi3ywfljs5sa1psi06awwjxzw0j9c2xx1b09yqv4a"))))
221 (build-system gnu-build-system)
222 (arguments
223 (list
224 #:phases
225 #~(modify-phases %standard-phases
226 ;; This package is distributed as a single shell script and comes
227 ;; without a proper build system.
228 (delete 'configure)
229 (delete 'build)
230 (replace 'check
231 (lambda* (#:key tests? #:allow-other-keys)
232 (when tests?
233 (substitute* "test.md"
234 ;; One test looks for an error from grep in the form "grep: foo",
235 ;; but our grep returns the absolute file name on errors. Adjust
236 ;; the test to cope with that.
237 (("sed 's/\\^e\\*grep: \\.\\*/")
238 "sed 's/.*e*grep: .*/"))
239
240 (setenv "HOME" "/tmp")
241 (invoke "./clitest" "test.md"))))
242 (replace 'install
243 (lambda _
244 (install-file "clitest" (string-append #$output "/bin"))
245 (install-file "README.md"
246 (string-append #$output "/share/doc/clitest-"
247 #$(package-version this-package))))))))
248 (native-inputs
249 (list perl)) ;for tests
250 (inputs
251 (list bash-minimal))
252 (synopsis "Command line test tool")
253 (description
254 "@command{clitest} is a portable shell script that performs automatic
255 testing of Unix command lines.")
256 (license license:expat)))
257
258 (define-public cunit
259 (package
260 (name "cunit")
261 (version "2.1-3")
262 (source
263 (origin
264 (method url-fetch)
265 (uri (string-append "mirror://sourceforge/cunit/CUnit/"
266 version "/CUnit-" version ".tar.bz2"))
267 (sha256
268 (base32
269 "057j82da9vv4li4z5ri3227ybd18nzyq81f6gsvhifs5z0vr3cpm"))))
270 (build-system gnu-build-system)
271 (arguments '(#:phases
272 (modify-phases %standard-phases
273 ;; XXX: The "bootstrap" phase detects the "bootstrap"
274 ;; script, but fails to execute it, so we bootstrap
275 ;; manually.
276 (replace 'bootstrap
277 (lambda _ (invoke "autoreconf" "-vfi"))))))
278 (native-inputs
279 (list automake autoconf libtool))
280 (home-page "http://cunit.sourceforge.net/")
281 (synopsis "Automated testing framework for C")
282 (description
283 "CUnit is a lightweight system for writing, administering, and running
284 unit tests in C. It provides C programmers with basic testing functionality
285 with a flexible variety of user interfaces.")
286 (license license:gpl2+)))
287
288 (define-public cppunit
289 (package
290 (name "cppunit")
291 (version "1.15.1")
292 (source (origin
293 (method url-fetch)
294 (uri (string-append "http://dev-www.libreoffice.org/src/"
295 name "-" version ".tar.gz"))
296 (sha256
297 (base32
298 "19qpqzy66bq76wcyadmi3zahk5v1ll2kig1nvg96zx9padkcdic9"))))
299 ;; Explicitly link with libdl. This is expected to be done by packages
300 ;; relying on cppunit for their tests. However, not all of them do.
301 ;; If we added the linker flag to such packages, we would pollute all
302 ;; binaries, not only those used for testing.
303 (arguments
304 `(#:make-flags '("LDFLAGS=-ldl")))
305 (build-system gnu-build-system)
306 (home-page "https://wiki.freedesktop.org/www/Software/cppunit/")
307 (synopsis "Unit testing framework for C++")
308 (description "CppUnit is the C++ port of the famous JUnit framework for
309 unit testing. Test output is in XML for automatic testing and GUI based for
310 supervised tests.")
311 (license license:lgpl2.1))) ; no copyright notices. LGPL2.1 is in the tarball
312
313 (define-public shunit2
314 (package
315 (name "shunit2")
316 (version "2.1.8")
317 (source (origin
318 (method git-fetch)
319 (uri (git-reference
320 (url "https://github.com/kward/shunit2")
321 (commit (string-append "v" version))))
322 (file-name (git-file-name name version))
323 (sha256
324 (base32
325 "08vs0jjl3pfh100sjlw31x4638xj7fghr0j2g1zfikba8n1f9491"))))
326 (build-system gnu-build-system)
327 (arguments
328 `(#:phases
329 (modify-phases %standard-phases
330 (delete 'configure) ; no configure script
331 (delete 'build)
332 (add-after 'patch-source-shebangs 'patch-more-shebangs
333 (lambda _
334 (substitute* "shunit2"
335 (("#! /bin/sh") (string-append "#! " (which "sh")))
336 (("/usr/bin/od") (which "od")))
337 (substitute* "test_runner"
338 (("/bin/sh") (which "sh"))
339 (("/bin/bash") (which "bash")))
340 #t))
341 (replace 'check
342 (lambda* (#:key tests? #:allow-other-keys)
343 (when tests?
344 ;; This test is buggy in the build container.
345 (delete-file "shunit2_misc_test.sh")
346 (invoke "sh" "test_runner"))
347 #t))
348 (replace 'install
349 (lambda* (#:key outputs #:allow-other-keys)
350 (install-file "shunit2"
351 (string-append (assoc-ref outputs "out")
352 "/bin"))
353 #t)))))
354 (home-page "https://github.com/kward/shunit2")
355 (synopsis "@code{xUnit} based unit testing for Unix shell scripts")
356 (description "@code{shUnit2} was originally developed to provide a
357 consistent testing solution for @code{log4sh}, a shell based logging framework
358 similar to @code{log4j}. It is designed to work in a similar manner to JUnit,
359 PyUnit and others.")
360 (license license:asl2.0)))
361
362 ;; When dependent packages upgraded to use newer version of catch, this one should
363 ;; be removed.
364 (define-public catch-framework
365 (package
366 (name "catch")
367 (version "1.3.5") ;Sub-minor is the build number
368 (source (origin
369 (method git-fetch)
370 (uri (git-reference
371 (url "https://github.com/philsquared/Catch")
372 ;; Semi-arbitrary.
373 (commit "ae5ee2cf63d6d67bd1369b512d2a7b60b571c907")))
374 (file-name (string-append name "-" version))
375 (sha256
376 (base32
377 "1yfb3lxv929szqy1nw9xw3d45wzkppziqshkjxvrb1fdmf46x564"))))
378 (build-system trivial-build-system)
379 (arguments
380 `(#:modules ((guix build utils))
381 #:builder (begin
382 (use-modules (guix build utils))
383 (let* ((source (assoc-ref %build-inputs "source"))
384 (output (assoc-ref %outputs "out"))
385 (incdir (string-append output "/include"))
386 (docdir (string-append output "/share/doc/catch-"
387 ,version)))
388 (for-each mkdir-p (list incdir docdir))
389 (install-file (string-append source
390 "/single_include/catch.hpp")
391 incdir)
392 (copy-recursively (string-append source "/docs")
393 docdir)
394 #t))))
395 (home-page "http://catch-lib.net/")
396 (synopsis "Automated test framework for C++ and Objective-C")
397 (description
398 "Catch stands for C++ Automated Test Cases in Headers and is a
399 multi-paradigm automated test framework for C++ and Objective-C.")
400 (license license:boost1.0)))
401
402 (define-public catch-framework2-1
403 (package
404 (name "catch2")
405 (version "1.12.2")
406 (home-page "https://github.com/catchorg/Catch2")
407 (source (origin
408 (method git-fetch)
409 (uri (git-reference
410 (url "https://github.com/catchorg/Catch2")
411 (commit (string-append "v" version))))
412 (file-name (git-file-name name version))
413 (sha256
414 (base32
415 "1gdp5wm8khn02g2miz381llw3191k7309qj8s3jd6sasj01rhf23"))))
416 (build-system cmake-build-system)
417 (synopsis "Automated test framework for C++ and Objective-C")
418 (description "Catch2 stands for C++ Automated Test Cases in Headers and is
419 a multi-paradigm automated test framework for C++ and Objective-C.")
420 (license license:boost1.0)))
421
422 (define-public catch-framework2
423 (package
424 (name "catch2")
425 (version "2.13.8")
426 (home-page "https://github.com/catchorg/Catch2")
427 (source (origin
428 (method git-fetch)
429 (uri (git-reference
430 (url "https://github.com/catchorg/Catch2")
431 (commit (string-append "v" version))))
432 (file-name (git-file-name name version))
433 (sha256
434 (base32
435 "18a6d7rcb6ilhxd5dff32jkfdf2ik58pbywrv04ras70217kdq4c"))))
436 (build-system cmake-build-system)
437 (inputs
438 (list python-wrapper))
439 (synopsis "Automated test framework for C++ and Objective-C")
440 (description "Catch2 stands for C++ Automated Test Cases in Headers and is
441 a multi-paradigm automated test framework for C++ and Objective-C.")
442 (license license:boost1.0)))
443
444 (define-public cmdtest
445 (package
446 (name "cmdtest")
447 ;; Use the latest commit (from 2019) in order to get Python 3 support.
448 (version "0.32-14-gcdfe14e")
449 (source (origin
450 (method git-fetch)
451 (uri (git-reference
452 (url "git://git.liw.fi/cmdtest/")
453 (commit version)))
454 (file-name (git-file-name name version))
455 (sha256
456 (base32
457 "1yhcwsqcpckkq5kw3h07k0xg6infyiyzq9ni3nqphrzxis7hxjf1"))))
458 (build-system python-build-system)
459 (arguments `(#:tests? #f)) ;requires Python 2!
460 (native-inputs
461 (list python-coverage-test-runner python))
462 (inputs
463 (list python-cliapp python-markdown python-ttystatus))
464 (home-page "https://liw.fi/cmdtest/")
465 (synopsis "Black box Unix program tester")
466 (description
467 "@code{cmdtest} black box tests Unix command line tools. Roughly, it is
468 given a command line and input files, and the expected output, and it verifies
469 that the command line produces the expected output. If not, it reports a
470 problem, and shows the differences.")
471 (license license:gpl3+)))
472
473 (define-public cmocka
474 (package
475 (name "cmocka")
476 (version "1.1.5")
477 (source (origin
478 (method url-fetch)
479 (uri (string-append "https://cmocka.org/files/"
480 (version-major+minor version) "/cmocka-"
481 version ".tar.xz"))
482 (sha256
483 (base32
484 "1dm8pdvkyfa8dsbz9bpq7wwgixjij4sii9bbn5sgvqjm5ljdik7h"))))
485 (build-system cmake-build-system)
486 (arguments
487 `(#:tests? #f)) ; no test target
488 (home-page "https://cmocka.org/")
489 (synopsis "Unit testing framework for C")
490 (description "Cmocka is a unit testing framework for C with support for
491 mock objects. It only requires the standard C library, and works with
492 different compilers. Cmocka supports several different message output formats
493 like Test Anything Protocol, Subunit, xUnit XML or the original cmockery output
494 format.")
495 (license license:asl2.0)))
496
497 (define-public cppcheck
498 (package
499 (name "cppcheck")
500 (version "2.3")
501 (source (origin
502 (method git-fetch)
503 (uri (git-reference
504 (url "https://github.com/danmar/cppcheck")
505 (commit version)))
506 (file-name (git-file-name name version))
507 (sha256
508 (base32 "03ic5mig3ryzkf85r95ryagf84s7y5nd6sqr915l3zj30apnifvz"))))
509 (build-system cmake-build-system)
510 (arguments
511 '(#:configure-flags '("-DBUILD_TESTS=ON")))
512 (home-page "http://cppcheck.sourceforge.net")
513 (synopsis "Static C/C++ code analyzer")
514 (description "Cppcheck is a static code analyzer for C and C++. Unlike
515 C/C++ compilers and many other analysis tools it does not detect syntax errors
516 in the code. Cppcheck primarily detects the types of bugs that the compilers
517 normally do not detect. The goal is to detect only real errors in the code
518 (i.e. have zero false positives).")
519 (license license:gpl3+)))
520
521 (define-public cxxtest
522 (package
523 (name "cxxtest")
524 (version "4.4")
525 (source (origin
526 (method url-fetch)
527 (uri (string-append "mirror://sourceforge/cxxtest/cxxtest/"
528 version "/cxxtest-" version ".tar.gz"))
529 (sha256
530 (base32
531 "1n7pbj4z9ivx005hqvivj9ddhq8awynzg6jishfbypf6j7ply58w"))))
532 (build-system python-build-system)
533 (arguments
534 '(#:phases
535 (modify-phases %standard-phases
536 (add-after 'unpack 'chdir-to-source
537 (lambda _
538 (chdir "python")
539 #t))
540 (add-after 'install 'install-headers
541 (lambda* (#:key outputs #:allow-other-keys)
542 (let* ((out (assoc-ref outputs "out"))
543 (include-dir (string-append out "/include/cxxtest")))
544 (for-each (lambda (header-file)
545 (install-file header-file include-dir))
546 (find-files "../cxxtest"))
547 #t)))
548 (add-after 'install 'install-doc
549 (lambda* (#:key outputs #:allow-other-keys)
550 (let* ((out (assoc-ref outputs "out"))
551 (doc-dir (string-append out "/share/doc/cxxtest")))
552 (install-file "../README" doc-dir)
553 (install-file "../doc/guide.txt" doc-dir)
554 (copy-recursively "../sample" (string-append doc-dir "/sample"))
555 #t))))))
556 (propagated-inputs
557 (list python-ply))
558 (home-page "https://cxxtest.com/")
559 (synopsis "Unit testing framework for C++")
560 (description "CxxTest is a unit testing framework for C++ that is similar
561 in spirit to JUnit, CppUnit, and xUnit. CxxTest does not require precompiling
562 a CxxTest testing library, it employs no advanced features of C++ (e.g. RTTI)
563 and it supports a very flexible form of test discovery.")
564 (license license:lgpl3+)))
565
566 (define-public doctest
567 (package
568 (name "doctest")
569 (version "2.4.8")
570 (home-page "https://github.com/onqtam/doctest")
571 (source (origin
572 (method git-fetch)
573 (uri (git-reference (url home-page)
574 (commit (string-append "v" version))))
575 (file-name (git-file-name name version))
576 (sha256
577 (base32
578 "057wdkv3gcz42mh1j284sgvm16i5fk1f9b1plgvavca70q4p52gz"))))
579 (build-system cmake-build-system)
580 (synopsis "C++ test framework")
581 (description
582 "doctest is a single-header testing framework for C++11 and later. It
583 has been designed to be fast, light and unintrusive.")
584 (license license:expat)))
585
586 (define-public go-github.com-smartystreets-gunit
587 (package
588 (name "go-github.com-smartystreets-gunit")
589 (version "1.0.0")
590 (source (origin
591 (method git-fetch)
592 (uri (git-reference
593 (url "https://github.com/smartystreets/gunit")
594 (commit version)))
595 (file-name (git-file-name name version))
596 (sha256
597 (base32
598 "00m4zg0kdj49mnpmf9klb44ba71p966xsk6zknrzqgfc8119f35z"))))
599 (build-system go-build-system)
600 (arguments
601 '(;; TODO: This package depends on go-github.com-smartystreets-assertions
602 ;; for running the tests, but go-github.com-smartystreets-assertions
603 ;; depends on this package, so break this loop by not running the tests
604 ;; for this package.
605 #:tests? #f
606 #:import-path "github.com/smartystreets/gunit"))
607 (synopsis "Testing tool for Go, in the style of xUnit")
608 (description
609 "@code{gunit} allows the test author to use a struct as the scope for a
610 group of related test cases, in the style of xUnit fixtures. This makes
611 extraction of setup/teardown behavior (as well as invoking the system under
612 test) much simpler.")
613 (home-page "https://github.com/smartystreets/gunit")
614 (license license:expat)))
615
616 (define-public go-github.com-smartystreets-assertions
617 (package
618 (name "go-github.com-smartystreets-assertions")
619 (version "1.8.1")
620 (source (origin
621 (method git-fetch)
622 (uri (git-reference
623 (url "https://github.com/smartystreets/assertions")
624 (commit version)))
625 (file-name (git-file-name name version))
626 (sha256
627 (base32
628 "1j0adgbykl55rf2945g0n5bmqdsnjcqlx5dcmpfh4chki43hiwg9"))))
629 (build-system go-build-system)
630 (arguments
631 '(#:import-path "github.com/smartystreets/assertions"))
632 (native-inputs
633 (list go-github.com-smartystreets-gunit))
634 (synopsis "Assertions for testing with Go")
635 (description
636 "The @code{assertions} package provides convenient assertion functions
637 for writing tests in Go.")
638 (home-page "https://github.com/smartystreets/assertions")
639 (license license:expat)))
640
641 (define-public go-github.com-smartystreets-goconvey
642 (package
643 (name "go-github.com-smartystreets-goconvey")
644 (version "1.6.3")
645 (source (origin
646 (method git-fetch)
647 (uri (git-reference
648 (url "https://github.com/smartystreets/goconvey")
649 (commit version)))
650 (file-name (git-file-name name version))
651 (sha256
652 (base32
653 "1ph18rkl3ns3fgin5i4j54w5a69grrmf3apcsmnpdn1wlrbs3dxh"))))
654 (build-system go-build-system)
655 (arguments
656 '(#:import-path "github.com/smartystreets/goconvey"))
657 (propagated-inputs
658 (list go-github.com-jtolds-gls go-github.com-smartystreets-assertions))
659 (synopsis "Go testing tool with both a web and terminal user interface")
660 (description
661 "GoConvey is a testing tool for Go. It integrates with go test, can show
662 test coverage and has a web user interface that will refresh automatically.")
663 (home-page "https://github.com/smartystreets/goconvey")
664 (license license:expat)))
665
666 (define-public googletest
667 (package
668 (name "googletest")
669 (version "1.11.0")
670 (source
671 (origin
672 (method git-fetch)
673 (uri (git-reference
674 (url "https://github.com/google/googletest")
675 (commit (string-append "release-" version))))
676 (file-name (git-file-name name version))
677 (sha256
678 (base32 "0pd4y1gpx1z8fiyarkvqlmk6hbv0lc8fr00ivnsvqzi1xg34jfaa"))))
679 (build-system cmake-build-system)
680 (arguments
681 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
682 (native-inputs
683 `(("python" ,python-wrapper)))
684 (home-page "https://github.com/google/googletest/")
685 (synopsis "Test discovery and XUnit test framework")
686 (description "Google Test features an XUnit test framework, automated test
687 discovery, death tests, assertions, parameterized tests and XML test report
688 generation.")
689 (license license:bsd-3)))
690
691 (define-public googletest-1.8
692 (package
693 (inherit googletest)
694 (version "1.8.1")
695 (source (origin
696 (method git-fetch)
697 (uri (git-reference
698 (url "https://github.com/google/googletest")
699 (commit (string-append "release-" version))))
700 (file-name (git-file-name "googletest" version))
701 (sha256
702 (base32
703 "0270msj6n7mggh4xqqjp54kswbl7mkcc8px1p5dqdpmw5ngh9fzk"))))))
704
705 (define-public googlebenchmark
706 (package
707 (name "googlebenchmark")
708 (version "1.5.3")
709 (home-page "https://github.com/google/benchmark")
710 (source (origin
711 (method git-fetch)
712 (uri (git-reference (url home-page)
713 (commit (string-append "v" version))))
714 (file-name (git-file-name "google-benchmark" version))
715 (sha256
716 (base32
717 "1hls0aqqj5cfldn9jfpvzjhpxkhrydrz9crp477rwllwjsybdxw7"))))
718 (build-system cmake-build-system)
719 (arguments
720 '(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON"
721 (string-append
722 "-DGOOGLETEST_PATH="
723 (assoc-ref %build-inputs "googletest")))))
724 (inputs
725 `(("googletest" ,(package-source googletest))))
726 (synopsis "C++ library to support the benchmarking of functions")
727 (description
728 "The googlebenchmark C++ library support the benchmarking of functions,
729 similar to unit tests.")
730 (license license:asl2.0)))
731
732 (define-public cpputest
733 (package
734 (name "cpputest")
735 (version "4.0")
736 (source
737 (origin
738 (method url-fetch)
739 (uri (string-append "https://github.com/cpputest/cpputest/releases/download/v"
740 version "/cpputest-" version ".tar.gz"))
741 (sha256
742 (base32
743 "1xslavlb1974y5xvs8n1j9zkk05dlw8imy4saasrjlmibl895ii1"))))
744 (build-system gnu-build-system)
745 (native-inputs
746 (list googletest))
747 (home-page "https://cpputest.github.io/")
748 (synopsis "Unit testing and mocking framework for C/C++")
749 (description
750 "CppUTest is a C/C++ based unit xUnit test framework. It is written in
751 C++ but is used in C and C++ projects and frequently used in embedded systems
752 but it works for any C/C++ project.")
753 (license license:bsd-3)))
754
755 (define-public python-parameterized
756 (package
757 (name "python-parameterized")
758 (version "0.7.4")
759 (source
760 (origin
761 (method url-fetch)
762 (uri (pypi-uri "parameterized" version))
763 (sha256
764 (base32 "1444fdz5bj0k10nmhxv0bv2gfrfisi7hfzqdndb0pvhf4g3qq3qr"))))
765 (build-system python-build-system)
766 (arguments
767 '(#:phases (modify-phases %standard-phases
768 (replace 'check
769 (lambda* (#:key tests? #:allow-other-keys)
770 (if tests?
771 (invoke "nosetests" "-v")
772 (format #t "test suite not run~%"))
773 #t)))))
774 (native-inputs
775 (list python-mock python-nose))
776 (home-page "https://github.com/wolever/parameterized")
777 (synopsis "Parameterized testing with any Python test framework")
778 (description
779 "Parameterized is a Python library that aims to fix parameterized testing
780 for every Python test framework. It supports nose, py.test, and unittest.")
781 (properties `((python2-variant . ,(delay python2-parameterized))))
782 (license license:bsd-2)))
783
784 (define-public python2-parameterized
785 (let ((base (package-with-python2 (strip-python2-variant
786 python-parameterized))))
787 (package/inherit
788 base
789 (source
790 (origin
791 (inherit (package-source base))
792 (patches (search-patches "python2-parameterized-docstring-test.patch")))))))
793
794 (define-public python-minimock
795 (package
796 (name "python-minimock")
797 (version "1.2.8")
798 (source
799 (origin
800 (method url-fetch)
801 (uri (pypi-uri "MiniMock" version))
802 (sha256
803 (base32
804 "0k2sxb1ibnyg05iblz7zhbv825f1zk9906rab7883iqgvzmdzpsz"))))
805 (build-system python-build-system)
806 (home-page "https://pypi.org/project/MiniMock")
807 (synopsis "Simple Python library for using mock objects")
808 (description "MiniMock is a simple library for building mock objects with
809 doctest.")
810 (license license:expat)))
811
812 (define-public python2-minimock
813 (package-with-python2 python-minimock))
814
815 (define-public python-mock
816 (package
817 (name "python-mock")
818 (version "3.0.5")
819 (source
820 (origin
821 (method url-fetch)
822 (uri (pypi-uri "mock" version))
823 (sha256
824 (base32
825 "1hrp6j0yrx2xzylfv02qa8kph661m6yq4p0mc8fnimch9j4psrc3"))))
826 (propagated-inputs
827 (list python-six))
828 (build-system python-build-system)
829 (arguments
830 ;; FIXME: Tests require "pytest", which depends on this package.
831 '(#:tests? #f))
832 (home-page "https://github.com/testing-cabal/mock")
833 (synopsis "Python mocking and patching library for testing")
834 (description
835 "Mock is a library for testing in Python. It allows you to replace parts
836 of your system under test with mock objects and make assertions about how they
837 have been used. This library is now part of Python (since Python 3.3),
838 available via the @code{unittest.mock} module.")
839 (properties `((python2-variant . ,(delay python2-mock))))
840 (license license:expat)))
841
842 (define-public python2-mock
843 (let ((base (package-with-python2
844 (strip-python2-variant python-mock))))
845 (package/inherit base
846 (propagated-inputs
847 `(("python2-functools32" ,python2-functools32)
848 ("python2-funcsigs" ,python2-funcsigs)
849 ,@(package-propagated-inputs base))))))
850
851 ;;; This package is unmaintained (see the note at the top of doc/index.rst).
852 (define-public python-nose
853 (package
854 (name "python-nose")
855 (version "1.3.7")
856 (source
857 (origin
858 (method url-fetch)
859 (uri (pypi-uri "nose" version))
860 (sha256
861 (base32
862 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
863 (build-system python-build-system)
864 (arguments
865 '(#:tests? #f
866 #:phases (modify-phases %standard-phases
867 (add-after 'unpack 'invoke-2to3
868 (lambda _
869 (invoke "2to3" "-w" "."))))))
870 (home-page "http://readthedocs.org/docs/nose/")
871 (synopsis "Python testing library")
872 (description
873 "Nose extends the unittest library to make testing easier.")
874 (license license:lgpl2.0+)
875 (properties `((python2-variant . ,(delay python2-nose))))))
876
877 (define-public python2-nose
878 (let ((base (package-with-python2
879 (strip-python2-variant python-nose))))
880 (package/inherit base
881 (arguments (substitute-keyword-arguments (package-arguments base)
882 ((#:phases phases)
883 `(modify-phases ,phases
884 (delete 'invoke-2to3))))))))
885
886 (define-public python-nose2
887 (package
888 (name "python-nose2")
889 (version "0.9.2")
890 (source
891 (origin
892 (method url-fetch)
893 (uri (pypi-uri "nose2" version))
894 (sha256
895 (base32
896 "0pmbb6nk31yhgh4zkcblzxsznml7f7pf5q1ihgrwvbxv4mwzfql7"))))
897 (build-system python-build-system)
898 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
899 (propagated-inputs
900 (list python-cov-core python-pytest-cov python-six))
901 (home-page "https://github.com/nose-devs/nose2")
902 (synopsis "Next generation of nicer testing for Python")
903 (description
904 "Nose2 is the next generation of nicer testing for Python, based on the
905 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
906 better plugin api, being easier for users to configure, and simplifying internal
907 interfaces and processes.")
908 (license license:bsd-2)))
909
910 (define-public python2-nose2
911 (package-with-python2 python-nose2))
912
913 (define-public python-unittest2
914 (package
915 (name "python-unittest2")
916 (version "1.1.0")
917 (source
918 (origin
919 (method url-fetch)
920 (uri (pypi-uri "unittest2" version))
921 (patches
922 (search-patches "python-unittest2-python3-compat.patch"
923 "python-unittest2-remove-argparse.patch"))
924 (sha256
925 (base32
926 "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212"))))
927 (build-system python-build-system)
928 (arguments
929 '(#:phases
930 (modify-phases %standard-phases
931 (replace 'check
932 (lambda _
933 (zero? (system* "python" "-m" "unittest2" "discover" "--verbose")))))))
934 (propagated-inputs
935 (list python-six python-traceback2))
936 (home-page "https://pypi.org/project/unittest2/")
937 (synopsis "Python unit testing library")
938 (description
939 "Unittest2 is a replacement for the unittest module in the Python
940 standard library.")
941 (license license:psfl)))
942
943 (define-public python2-unittest2
944 (package-with-python2 python-unittest2))
945
946 (define-public python-pytest
947 (package
948 (name "python-pytest")
949 (version "6.2.5")
950 (source
951 (origin
952 (method url-fetch)
953 (uri (pypi-uri "pytest" version))
954 (sha256
955 (base32
956 "12cyi0lnyaq8sdqfnqlppd76gkw6zcg10gyih5knx9v611l3c6qk"))))
957 (build-system python-build-system)
958 (arguments
959 `(#:phases
960 (modify-phases %standard-phases
961 (add-before 'build 'pretend-version
962 ;; The version string is usually derived via setuptools-scm, but
963 ;; without the git metadata available, the version string is set to
964 ;; '0.0.0'.
965 (lambda _
966 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)))
967 (replace 'check
968 (lambda* (#:key (tests? #t) #:allow-other-keys)
969 (setenv "TERM" "dumb") ;attempt disabling markup tests
970 (if tests?
971 (invoke "pytest" "-vv" "-k"
972 (string-append
973 ;; This test involves the /usr directory, and fails.
974 " not test_argcomplete"
975 ;; These test do not honor the isatty detection and
976 ;; fail.
977 " and not test_code_highlight"
978 " and not test_color_yes"))
979 (format #t "test suite not run~%")))))))
980 (propagated-inputs
981 `(("python-attrs" ,python-attrs-bootstrap)
982 ("python-iniconfig" ,python-iniconfig)
983 ("python-more-itertools" ,python-more-itertools)
984 ("python-packaging" ,python-packaging-bootstrap)
985 ("python-pluggy" ,python-pluggy)
986 ("python-py" ,python-py)
987 ("python-six" ,python-six-bootstrap)
988 ("python-toml" ,python-toml)
989 ("python-wcwidth" ,python-wcwidth)))
990 (native-inputs
991 `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
992 ("bash" ,bash)
993 ("python-hypothesis" ,python-hypothesis)
994 ("python-nose" ,python-nose)
995 ("python-mock" ,python-mock)
996 ("python-pytest" ,python-pytest-bootstrap)
997 ("python-setuptools-scm" ,python-setuptools-scm)
998 ("python-toml" ,python-toml)
999 ("python-xmlschema" ,python-xmlschema)))
1000 (home-page "https://docs.pytest.org/en/latest/")
1001 (synopsis "Python testing library")
1002 (description
1003 "Pytest is a testing tool that provides auto-discovery of test modules
1004 and functions, detailed info on failing assert statements, modular fixtures,
1005 and many external plugins.")
1006 (license license:expat)
1007 (properties `((python2-variant . ,(delay python2-pytest))))))
1008
1009 (define-public python-pytest-6 python-pytest)
1010
1011 ;; Pytest 4.x are the last versions that support Python 2.
1012 (define-public python2-pytest
1013 (package
1014 (inherit (strip-python2-variant python-pytest))
1015 (name "python2-pytest")
1016 (version "4.6.11")
1017 (source (origin
1018 (method url-fetch)
1019 (uri (pypi-uri "pytest" version))
1020 (sha256
1021 (base32
1022 "0ls3pqr86xgif6bphsb6wrww9r2vc7p7a2naq8zcq8115wwq5yjh"))))
1023 (build-system python-build-system)
1024 (arguments
1025 `(#:python ,python-2
1026 ,@(package-arguments python-pytest)))
1027 (propagated-inputs
1028 `(("python-atomicwrites" ,python2-atomicwrites)
1029 ("python-attrs" ,python2-attrs-bootstrap)
1030 ("python-funcsigs" ,python2-funcsigs)
1031 ("python-importlib-metadata" ,python2-importlib-metadata-bootstrap)
1032 ("python-more-itertools" ,python2-more-itertools)
1033 ("python-packaging" ,python2-packaging-bootstrap)
1034 ("python-pathlib2" ,python2-pathlib2)
1035 ("python-pluggy" ,python2-pluggy)
1036 ("python-py" ,python2-py)
1037 ("python-six" ,python2-six-bootstrap)
1038 ("python-wcwidth" ,python2-wcwidth)))
1039 (native-inputs
1040 `(("bash" ,bash) ;tests require 'compgen'
1041 ("python-hypothesis" ,python2-hypothesis)
1042 ("python-nose" ,python2-nose)
1043 ("python-mock" ,python2-mock)
1044 ("python-pytest" ,python2-pytest-bootstrap)
1045 ("python-setuptools-scm" ,python2-setuptools-scm)))))
1046
1047 (define-public python-pytest-bootstrap
1048 (package
1049 (inherit (strip-python2-variant python-pytest))
1050 (name "python-pytest-bootstrap")
1051 (native-inputs (list python-iniconfig python-setuptools-scm
1052 python-toml))
1053 (arguments `(#:tests? #f))
1054 (properties `((python2-variant . ,(delay python2-pytest-bootstrap))))))
1055
1056 (define-public python2-pytest-bootstrap
1057 (hidden-package
1058 (package/inherit
1059 python2-pytest
1060 (name "python2-pytest-bootstrap")
1061 (arguments
1062 (substitute-keyword-arguments (package-arguments python2-pytest)
1063 ((#:tests? _ #f) #f)))
1064 (native-inputs
1065 `(("python-setuptools-scm" ,python2-setuptools-scm)))
1066 (propagated-inputs
1067 `(("python-atomicwrites" ,python2-atomicwrites)
1068 ("python-attrs" ,python2-attrs-bootstrap)
1069 ("python-funcsigs" ,python2-funcsigs-bootstrap)
1070 ("python-importlib-metadata" ,python2-importlib-metadata-bootstrap)
1071 ("python-more-itertools" ,python2-more-itertools)
1072 ("python-packaging" ,python2-packaging-bootstrap)
1073 ("python-pathlib2" ,python2-pathlib2-bootstrap)
1074 ("python-pluggy" ,python2-pluggy-bootstrap)
1075 ("python-py" ,python2-py)
1076 ("python-wcwidth" ,python2-wcwidth))))))
1077
1078 (define-public python-pytest-assume
1079 (package
1080 (name "python-pytest-assume")
1081 (version "2.4.3")
1082 (source
1083 (origin
1084 (method url-fetch)
1085 (uri (pypi-uri "pytest-assume" version))
1086 (sha256
1087 (base32 "0zilqsy9fcjr6l2f9qzfxpkp40h24csnjm5mifhpmzb0fr9r0glq"))))
1088 (build-system python-build-system)
1089 (arguments
1090 `(#:phases (modify-phases %standard-phases
1091 (replace 'check
1092 (lambda* (#:key tests? #:allow-other-keys)
1093 (when tests?
1094 (invoke "pytest")))))))
1095 (propagated-inputs
1096 (list python-pytest python-six))
1097 (home-page "https://github.com/astraw38/pytest-assume")
1098 (synopsis "Pytest plugin that allows multiple failures per test")
1099
1100 (description "This package provides a Pytest plugin that allows multiple
1101 failures per test. This is a fork from pytest-expect which includes the
1102 following improvements:
1103 @itemize
1104 @item showlocals support (the Pytest option)
1105 @item global usage support (a fixture is not required)
1106 @item output refinements and tweaks.
1107 @end itemize")
1108 (license license:expat)))
1109
1110 (define-public python-pytest-cov
1111 (package
1112 (name "python-pytest-cov")
1113 (version "2.8.1")
1114 (source
1115 (origin
1116 (method url-fetch)
1117 (uri (pypi-uri "pytest-cov" version))
1118 (sha256
1119 (base32 "0avzlk9p4nc44k7lpx9109dybq71xqnggxb9f4hp0l64pbc44ryc"))))
1120 (build-system python-build-system)
1121 (arguments
1122 `(#:phases
1123 (modify-phases %standard-phases
1124 (replace 'check
1125 (lambda _
1126 ;; Options taken from tox.ini.
1127 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1128 ;; with "Duplicate implicit target name".
1129 (invoke "python" "./setup.py" "check"
1130 "--strict" "--metadata"))))))
1131 (propagated-inputs
1132 (list python-coverage python-pytest))
1133 (home-page "https://github.com/pytest-dev/pytest-cov")
1134 (synopsis "Pytest plugin for measuring coverage")
1135 (description
1136 "Pytest-cov produces coverage reports. It supports centralised testing and
1137 distributed testing in both @code{load} and @code{each} modes. It also
1138 supports coverage of subprocesses.")
1139 (license license:expat)))
1140
1141 (define-public python2-pytest-cov
1142 (package-with-python2 python-pytest-cov))
1143
1144 (define-public python-pytest-httpserver
1145 (package
1146 (name "python-pytest-httpserver")
1147 (version "1.0.0")
1148 (source (origin
1149 (method url-fetch)
1150 (uri (pypi-uri "pytest_httpserver" version))
1151 (sha256
1152 (base32
1153 "0vbls0j570l5my83j4jnk5blmnir44i0w511azlh41nl6k8rac5f"))))
1154 (build-system python-build-system)
1155 (native-inputs
1156 (list python-pytest))
1157 (propagated-inputs
1158 (list python-werkzeug))
1159 (arguments
1160 '(#:phases
1161 (modify-phases %standard-phases
1162 (add-before 'check 'fix-library-loading
1163 (lambda _
1164 (setenv "GUIX_PYTHONPATH" (string-append (getenv "GUIX_PYTHONPATH") ":."))))
1165 (replace 'check
1166 (lambda _
1167 (invoke "pytest" "tests" "-vv")
1168 (invoke "pytest" "tests" "-vv" "--ssl"))))))
1169 (home-page "https://github.com/csernazs/pytest-httpserver")
1170 (synopsis "HTTP server for pytest")
1171 (description "Pytest plugin library to test http clients without
1172 contacting the real http server.")
1173 (license license:expat)))
1174
1175 (define-public python-pytest-random-order
1176 (package
1177 (name "python-pytest-random-order")
1178 (version "1.0.4")
1179 (source
1180 (origin
1181 (method url-fetch)
1182 (uri (pypi-uri "pytest-random-order" version))
1183 (sha256
1184 (base32 "0lpzl218l04vjy4gckrbrcacc3w9xrjnvz64bf2i132c58s5j8bb"))))
1185 (build-system python-build-system)
1186 (arguments
1187 `(#:phases (modify-phases %standard-phases
1188 (replace 'check
1189 (lambda* (#:key tests? #:allow-other-keys)
1190 (when tests?
1191 (invoke "python" "-m" "pytest" "--random-order")))))))
1192 (propagated-inputs
1193 (list python-pytest))
1194 (home-page "https://github.com/jbasko/pytest-random-order")
1195 (synopsis "Pytest plugin to randomize the order of tests")
1196 (description "@code{pytest-random-order} is a Pytest plugin that
1197 randomizes the order of tests. This can be useful to detect a test that
1198 passes just because it happens to run after an unrelated test that leaves the
1199 system in a favourable state. The plugin allows user to control the level of
1200 randomness they want to introduce and to disable reordering on subsets of
1201 tests. Tests can be rerun in a specific order by passing a seed value
1202 reported in a previous test run.")
1203 (license license:expat)))
1204
1205 (define-public python-pytest-runner
1206 (package
1207 (name "python-pytest-runner")
1208 (version "5.2")
1209 (source
1210 (origin
1211 (method url-fetch)
1212 (uri (pypi-uri "pytest-runner" version))
1213 (sha256
1214 (base32
1215 "0awll1bva5zy8cspsxcpv7pjcrdf5c6pf56nqn4f74vvmlzfgiwn"))))
1216 (build-system python-build-system)
1217 (arguments
1218 '(;; FIXME: The test suite requires 'python-flake8' and 'python-black',
1219 ;; but that introduces a circular dependency.
1220 #:tests? #f
1221 #:phases (modify-phases %standard-phases
1222 (replace 'check
1223 (lambda* (#:key tests? #:allow-other-keys)
1224 (if tests?
1225 (invoke "pytest" "-vv")
1226 (format #t "test suite not run~%"))
1227 #t)))))
1228 (native-inputs
1229 (list python-setuptools-scm))
1230 (home-page "https://github.com/pytest-dev/pytest-runner")
1231 (synopsis "Invoke py.test as a distutils command")
1232 (description
1233 "This package provides a @command{pytest-runner} command that
1234 @file{setup.py} files can use to run tests.")
1235 (license license:expat)))
1236
1237 (define-public python2-pytest-runner
1238 (package-with-python2 python-pytest-runner))
1239
1240 ;; python-bleach 3.1.0 requires this ancient version of pytest-runner.
1241 ;; Remove once no longer needed.
1242 (define-public python-pytest-runner-2
1243 (package
1244 (inherit python-pytest-runner)
1245 (version "2.12.2")
1246 (source (origin
1247 (method url-fetch)
1248 (uri (pypi-uri "pytest-runner" version))
1249 (sha256
1250 (base32
1251 "11ivjj9hfphkv4yfb2g74av4yy86y8gcbf7gbif0p1hcdfnxg3w6"))))))
1252
1253 (define-public python2-pytest-runner-2
1254 (package-with-python2 python-pytest-runner-2))
1255
1256 (define-public python-pytest-lazy-fixture
1257 (package
1258 (name "python-pytest-lazy-fixture")
1259 (version "0.6.3")
1260 (source
1261 (origin
1262 (method url-fetch)
1263 (uri (pypi-uri "pytest-lazy-fixture" version))
1264 (sha256
1265 (base32 "1b0hmnsxw4s2wf9pks8dg6dfy5cx3zcbzs8517lfccxsfizhqz8f"))))
1266 (build-system python-build-system)
1267 (arguments
1268 '(#:phases
1269 (modify-phases %standard-phases
1270 (replace 'check
1271 (lambda* (#:key inputs outputs #:allow-other-keys)
1272 ;; Make the installed plugin discoverable by Pytest.
1273 (add-installed-pythonpath inputs outputs)
1274 (invoke "pytest" "-vv"))))))
1275 (propagated-inputs
1276 (list python-pytest))
1277 (home-page "https://github.com/tvorog/pytest-lazy-fixture")
1278 (synopsis "Use fixtures in @code{pytest.mark.parametrize}")
1279 (description "This plugin helps to use fixtures in
1280 @code{pytest.mark.parametrize}.")
1281 (license license:expat)))
1282
1283 (define-public python-pytest-mock
1284 (package
1285 (name "python-pytest-mock")
1286 (version "3.6.1")
1287 (source
1288 (origin
1289 (method url-fetch)
1290 (uri (pypi-uri "pytest-mock" version))
1291 (sha256
1292 (base32 "0qhfmd05z3g88bnwq6644jl6p5wy01i4yy7h8883z9jjih2pl8a0"))
1293 (modules '((guix build utils)))
1294 (snippet
1295 ;; Some tests do a string match on Pytest output, and fails when
1296 ;; warnings are present. Adjust to cope with warnings from
1297 ;; third-party libraries (looking at you, pytest-asyncio).
1298 '(substitute* "tests/test_pytest_mock.py"
1299 (("1 passed in \\*")
1300 "1 passed*")))))
1301 (build-system python-build-system)
1302 (arguments
1303 '(#:phases
1304 (modify-phases %standard-phases
1305 (replace 'check
1306 (lambda* (#:key tests? #:allow-other-keys)
1307 (when tests?
1308 ;; Skip the assertion rewriting tests, which don't work in the
1309 ;; presence of read-only Python modules (a limitation of
1310 ;; Pytest). Also skip the "test_standalone_mock" test, which
1311 ;; can only work when 'python-mock' is not available
1312 ;; (currently propagated by Pytest 5).
1313 (invoke "pytest" "--assert=plain" "-vv"
1314 "-k" "not test_standalone_mock")))))))
1315 (native-inputs
1316 (list python-pytest-asyncio python-setuptools-scm))
1317 (propagated-inputs
1318 (list python-pytest))
1319 (home-page "https://github.com/pytest-dev/pytest-mock/")
1320 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1321 (description
1322 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1323 around the patching API provided by the @code{mock} package, but with the
1324 benefit of not having to worry about undoing patches at the end of a test.
1325 The mocker fixture has the same API as @code{mock.patch}, supporting the
1326 same arguments.")
1327 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1328 (license license:expat)))
1329
1330 (define-public python2-pytest-mock
1331 (let ((base (package-with-python2
1332 (strip-python2-variant python-pytest-mock))))
1333 (package/inherit base
1334 (version "1.10.1")
1335 (source
1336 (origin
1337 (method url-fetch)
1338 (uri (pypi-uri "pytest-mock" version))
1339 (sha256
1340 (base32
1341 "1i5mg3ff1qk0wqfcxfz60hwy3q5dskdp36i10ckigkzffg8hc3ad"))))
1342 (arguments
1343 `(#:python ,python-2))
1344 (native-inputs
1345 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
1346 (propagated-inputs
1347 `(("python2-mock" ,python2-mock)
1348 ("python2-pytest" ,python2-pytest))))))
1349
1350 (define-public python-pytest-xdist
1351 (package
1352 (name "python-pytest-xdist")
1353 (version "2.1.0")
1354 (source
1355 (origin
1356 (method url-fetch)
1357 (uri (pypi-uri "pytest-xdist" version))
1358 (sha256
1359 (base32
1360 "0wh6pn66nncfs6ay0n863bgyriwsgppn8flx5l7551j1lbqkinc2"))
1361 (modules '((guix build utils)))
1362 (snippet
1363 '(begin
1364 ;; Remove pre-compiled .pyc files from source.
1365 (for-each delete-file-recursively
1366 (find-files "." "__pycache__" #:directories? #t))
1367 (for-each delete-file (find-files "." "\\.pyc$"))
1368 #t))))
1369 (build-system python-build-system)
1370 (arguments
1371 '(#:tests? #f ; Lots of tests fail.
1372 #:phases
1373 (modify-phases %standard-phases
1374 (add-after 'unpack 'patch-setup-py
1375 (lambda _
1376 ;; Relax pytest requirement.
1377 (substitute* "setup.py"
1378 (("pytest>=6\\.0\\.0") "pytest"))))
1379 (replace 'check
1380 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1381 (when tests?
1382 (add-installed-pythonpath inputs outputs)
1383 (invoke "pytest" "-vv"
1384 "-n" (number->string (parallel-job-count)))))))))
1385 (native-inputs
1386 (list python-setuptools-scm))
1387 (propagated-inputs
1388 (list python-execnet python-pytest python-py python-pytest-forked))
1389 (home-page
1390 "https://github.com/pytest-dev/pytest-xdist")
1391 (synopsis
1392 "Plugin for py.test with distributed testing and loop-on-failing modes")
1393 (description
1394 "The pytest-xdist plugin extends py.test with some unique test execution
1395 modes: parallelization, running tests in boxed subprocesses, the ability
1396 to run tests repeatedly when failed, and the ability to run tests on multiple
1397 Python interpreters or platforms. It uses rsync to copy the existing
1398 program code to a remote location, executes there, and then syncs the
1399 result back.")
1400 (license license:expat)))
1401
1402 (define-public python2-pytest-xdist
1403 (package-with-python2 python-pytest-xdist))
1404
1405 (define-public python-pytest-xdist-next
1406 (package/inherit python-pytest-xdist
1407 (name "python-pytest-xdist")
1408 (version "2.3.0")
1409 (source
1410 (origin
1411 (method url-fetch)
1412 (uri (pypi-uri "pytest-xdist" version))
1413 (sha256
1414 (base32
1415 "19cy57jrf3pwi7x6fnbxryjvqagsl0yv736jnynvr3yqhlpxxv78"))))
1416 (propagated-inputs
1417 `(("python-execnet" ,python-execnet)
1418 ("python-pytest" ,python-pytest-6)
1419 ("python-pytest-forked" ,python-pytest-forked)))))
1420
1421 (define-public python-pytest-timeout
1422 (package
1423 (name "python-pytest-timeout")
1424 (version "2.0.2")
1425 (source
1426 (origin
1427 (method url-fetch)
1428 (uri (pypi-uri "pytest-timeout" version))
1429 (sha256
1430 (base32
1431 "04l1cd2qyp3fbccw95a8nqg682r647v7yil8807dgs7xv9a8pyg6"))))
1432 (build-system python-build-system)
1433 (arguments
1434 '(#:phases (modify-phases %standard-phases
1435 (replace 'check
1436 (lambda* (#:key inputs outputs #:allow-other-keys)
1437 ;; Make the installed plugin discoverable by Pytest.
1438 (add-installed-pythonpath inputs outputs)
1439 (invoke "pytest" "-vv"))))))
1440 (propagated-inputs
1441 (list python-pytest python-pytest-cov))
1442 (native-inputs
1443 (list python-pexpect))
1444 (home-page "https://github.com/pytest-dev/pytest-timeout")
1445 (synopsis "Plugin for py.test to abort hanging tests")
1446 (description
1447 "This package provides a py.test plugin that aborts hanging tests after a
1448 timeout has been exceeded.")
1449 (license license:expat)))
1450
1451 (define-public python-pytest-forked
1452 (package
1453 (name "python-pytest-forked")
1454 (version "1.3.0")
1455 (source
1456 (origin
1457 (method git-fetch) ;for tests
1458 (uri (git-reference
1459 (url "https://github.com/pytest-dev/pytest-forked")
1460 (commit (string-append "v" version))))
1461 (file-name (git-file-name name version))
1462 (sha256
1463 (base32
1464 "1aip4kx50ynvykl7kq2mlbsi82vx701dvb8mm64lhp69bbv105rc"))))
1465 (build-system python-build-system)
1466 (arguments
1467 `(#:phases
1468 (modify-phases %standard-phases
1469 (add-after 'unpack 'disable-setuptools-scm
1470 (lambda _
1471 (substitute* "setup.py"
1472 (("use_scm_version=True")
1473 (format #f "version=~s" ,version))
1474 (("setup_requires=\\['setuptools_scm'\\],.*")
1475 ""))))
1476 (replace 'check
1477 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1478 (when tests?
1479 (add-installed-pythonpath inputs outputs)
1480 (invoke "pytest" "-vv")))))))
1481 (native-inputs
1482 ;; XXX: The bootstrap variant of Pytest is used to ensure the
1483 ;; 'hypothesis' plugin is not in the environment (due to
1484 ;; <http://issues.guix.gnu.org/25235>), which would cause the test suite
1485 ;; to fail (see: https://github.com/pytest-dev/pytest-forked/issues/54).
1486 `(("python-pytest" ,python-pytest-bootstrap)))
1487 (home-page "https://github.com/pytest-dev/pytest-forked")
1488 (synopsis "Pytest plugin to run tests in isolated forked subprocesses")
1489 (description "This package provides a Pytest plugin which enables running
1490 each test in a subprocess and will report if a test crashed the process. It
1491 can be useful to isolate tests against undesirable global environment
1492 side-effects (such as setting environment variables).")
1493 (license license:expat)))
1494
1495 (define-public python-scripttest
1496 (package
1497 (name "python-scripttest")
1498 (version "1.3")
1499 (source
1500 (origin
1501 (method url-fetch)
1502 (uri (pypi-uri "scripttest" version))
1503 (sha256
1504 (base32
1505 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1506 (build-system python-build-system)
1507 (native-inputs
1508 (list python-pytest))
1509 (home-page (string-append "https://web.archive.org/web/20161029233413/"
1510 "http://pythonpaste.org/scripttest/"))
1511 (synopsis "Python library to test command-line scripts")
1512 (description "Scripttest is a Python helper library for testing
1513 interactive command-line applications. With it you can run a script in a
1514 subprocess and see the output as well as any file modifications.")
1515 (license license:expat)))
1516
1517 (define-public python-testtools-bootstrap
1518 (package
1519 (name "python-testtools-bootstrap")
1520 (version "2.5.0")
1521 (source
1522 (origin
1523 (method url-fetch)
1524 (uri (pypi-uri "testtools" version))
1525 (sha256
1526 (base32
1527 "0gxjbjk93jjqi491k4s9rh3ia37v21yifd35pvizv7sgv4rk9hap"))))
1528 (build-system python-build-system)
1529 (arguments '(#:tests? #f))
1530 (propagated-inputs
1531 `(("python-extras" ,python-extras)
1532 ("python-fixtures" ,python-fixtures-bootstrap)
1533 ("python-pbr" ,python-pbr-minimal)))
1534 (home-page "https://github.com/testing-cabal/testtools")
1535 (synopsis
1536 "Extensions to the Python standard library unit testing framework")
1537 (description
1538 "This package is only for bootstrapping. Do not use this.")
1539 (license license:psfl)))
1540
1541 (define-public python-testtools
1542 (package
1543 (inherit python-testtools-bootstrap)
1544 (name "python-testtools")
1545 (arguments
1546 `(#:phases
1547 (modify-phases %standard-phases
1548 (replace 'check
1549 (lambda* (#:key tests? #:allow-other-keys)
1550 (when tests?
1551 (invoke "python" "-m" "testtools.run"
1552 "testtools.tests.test_suite")))))))
1553 (propagated-inputs
1554 (list python-extras python-fixtures python-pbr))
1555 (native-inputs
1556 `(("python-testscenarios" ,python-testscenarios-bootstrap)))
1557 (description
1558 "Testtools extends the Python standard library unit testing framework to
1559 provide matchers, more debugging information, and cross-Python
1560 compatibility.")))
1561
1562 (define-public python-testscenarios-bootstrap
1563 (package
1564 (name "python-testscenarios-bootstrap")
1565 (version "0.5.0")
1566 (source
1567 (origin
1568 (method url-fetch)
1569 (uri (pypi-uri "testscenarios" version))
1570 (sha256
1571 (base32
1572 "1dm2aydqpv76vnsk1pw7k8n42hq58cfi4n1ixy7nyzpaj1mwnmy2"))))
1573 (build-system python-build-system)
1574 (arguments
1575 `(#:phases (modify-phases %standard-phases
1576 (replace 'check
1577 (lambda _
1578 (invoke "python" "-m" "testtools.run"
1579 "testscenarios.test_suite"))))))
1580 (propagated-inputs
1581 `(("python-pbr" ,python-pbr-minimal)
1582 ("python-testtools" ,python-testtools-bootstrap)))
1583 (home-page "https://launchpad.net/testscenarios")
1584 (synopsis "Pyunit extension for dependency injection")
1585 (description
1586 "This package is only for bootstrapping. Don't use this.")
1587 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1588
1589 (define-public python-testscenarios
1590 (package
1591 (inherit python-testscenarios-bootstrap)
1592 (name "python-testscenarios")
1593 (propagated-inputs
1594 (list python-pbr python-testtools))
1595 (description
1596 "Testscenarios provides clean dependency injection for Python unittest
1597 style tests.")))
1598
1599 ;; Testresources requires python-pbr at runtime, but pbr needs it for its
1600 ;; own tests. Hence this bootstrap variant.
1601 (define-public python-testresources-bootstrap
1602 (package
1603 (name "python-testresources-bootstrap")
1604 (version "2.0.1")
1605 (source (origin
1606 (method url-fetch)
1607 (uri (pypi-uri "testresources" version))
1608 (sha256
1609 (base32
1610 "05s4dsli9g17m1r3b1gvwicbbgq011hnpb2b9qnj27ja2n11k7gf"))))
1611 (build-system python-build-system)
1612 (arguments '(#:tests? #f))
1613 (propagated-inputs
1614 `(("python-pbr" ,python-pbr-minimal)))
1615 (home-page "https://launchpad.net/testresources")
1616 (synopsis
1617 "Pyunit extension for managing test resources")
1618 (description
1619 "This package is only here for bootstrapping purposes. Use the regular
1620 testresources package instead.")
1621 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1622
1623 (define-public python-testresources
1624 (package
1625 (inherit python-testresources-bootstrap)
1626 (name "python-testresources")
1627 (propagated-inputs
1628 (list python-pbr))
1629 (arguments '())
1630 (native-inputs
1631 (list python-fixtures python-testtools))
1632 (description
1633 "Testresources is an extension to Python's unittest to allow declarative
1634 use of resources by test cases.")))
1635
1636 (define-public python-subunit-bootstrap
1637 (package
1638 (name "python-subunit-bootstrap")
1639 (version "1.4.0")
1640 (source
1641 (origin
1642 (method url-fetch)
1643 (uri (pypi-uri "python-subunit" version))
1644 (sha256
1645 (base32
1646 "0j0ymmnc5nfxi1qzvy59j27viqca7l7xd0y9x29g7yr0h693j804"))))
1647 (build-system python-build-system)
1648 (propagated-inputs
1649 (list python-extras python-testtools-bootstrap))
1650 (native-inputs
1651 (list python-fixtures-bootstrap python-hypothesis
1652 python-testscenarios-bootstrap))
1653 (home-page "https://launchpad.net/subunit")
1654 (synopsis "Python implementation of the subunit protocol")
1655 (description
1656 "This package is here for bootstrapping purposes only. Use the regular
1657 python-subunit package instead.")
1658 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1659
1660 (define-public python-subunit
1661 (package
1662 (inherit python-subunit-bootstrap)
1663 (name "python-subunit")
1664 (propagated-inputs
1665 (list python-extras python-testtools))
1666 (native-inputs
1667 (list python-fixtures python-hypothesis python-testscenarios))
1668 (description
1669 "Python-subunit is a Python implementation of the subunit test streaming
1670 protocol.")))
1671
1672 ;; Fixtures requires python-pbr at runtime, but pbr uses fixtures for its
1673 ;; own tests. Hence this bootstrap variant.
1674 (define-public python-fixtures-bootstrap
1675 (package
1676 (name "python-fixtures-bootstrap")
1677 (version "3.0.0")
1678 (source
1679 (origin
1680 (method url-fetch)
1681 (uri (pypi-uri "fixtures" version))
1682 (sha256
1683 (base32
1684 "1vxj29bzz3rd4pcy51d05wng9q9dh4jq6wx92yklsm7i6h1ddw7w"))
1685 (patches (search-patches "python-fixtures-remove-monkeypatch-test.patch"))))
1686 (build-system python-build-system)
1687 (arguments
1688 `(#:tests? #f
1689 #:phases
1690 (modify-phases %standard-phases
1691 ;; Package is not loadable on its own at this stage.
1692 (delete 'sanity-check))))
1693 (propagated-inputs
1694 (list python-pbr-minimal python-six))
1695 (home-page "https://launchpad.net/python-fixtures")
1696 (synopsis "Python test fixture library")
1697 (description
1698 "This package is only used for bootstrapping. Use the regular
1699 python-fixtures package instead.")
1700 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
1701
1702 (define-public python-fixtures
1703 (package
1704 (inherit python-fixtures-bootstrap)
1705 (name "python-fixtures")
1706 (arguments
1707 '(#:phases
1708 (modify-phases %standard-phases
1709 (replace 'check
1710 (lambda* (#:key tests? #:allow-other-keys)
1711 (when tests?
1712 (invoke "python" "-m" "testtools.run"
1713 "fixtures.test_suite")))))))
1714 (propagated-inputs
1715 ;; Fixtures uses pbr at runtime to check versions, etc.
1716 (list python-pbr python-six))
1717 (native-inputs
1718 `(("python-mock" ,python-mock)
1719 ("python-testtools" ,python-testtools-bootstrap)))
1720 (description
1721 "Fixtures provides a way to create reusable state, useful when writing
1722 Python tests.")))
1723
1724 (define-public python-testrepository-bootstrap
1725 (package
1726 (name "python-testrepository-bootstrap")
1727 (version "0.0.20")
1728 (source
1729 (origin
1730 (method url-fetch)
1731 (uri (pypi-uri "testrepository" version))
1732 (sha256
1733 (base32
1734 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
1735 (build-system python-build-system)
1736 (arguments '(#:tests? #f))
1737 (propagated-inputs
1738 `(("python-fixtures" ,python-fixtures-bootstrap)
1739 ("python-subunit" ,python-subunit-bootstrap)
1740 ("python-testtools" ,python-testtools-bootstrap)))
1741 (native-inputs
1742 (list python-mimeparse))
1743 (home-page "https://launchpad.net/testrepository")
1744 (synopsis "Database for Python test results")
1745 (description
1746 "Bootstrap package for python-testrepository. Don't use this.")
1747 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
1748
1749 (define-public python-testrepository
1750 (package
1751 (inherit python-testrepository-bootstrap)
1752 (name "python-testrepository")
1753 (arguments
1754 ;; FIXME: Many tests are failing.
1755 '(#:tests? #f))
1756 (propagated-inputs
1757 (list python-fixtures python-subunit python-testtools))
1758 (native-inputs
1759 (list python-mimeparse))
1760 (description "Testrepository provides a database of test results which can
1761 be used as part of a developer's workflow to check things such as what tests
1762 have failed since the last commit or what tests are currently failing.")))
1763
1764 (define-public python-coverage
1765 (package
1766 (name "python-coverage")
1767 (version "5.2.1")
1768 (source
1769 (origin
1770 (method url-fetch)
1771 (uri (pypi-uri "coverage" version))
1772 (sha256
1773 (base32
1774 "16z8i18msgs8k74n73dj9x49wzkl0vk4vq8k5pl1bsj70y7b4k53"))))
1775 (build-system python-build-system)
1776 (arguments
1777 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
1778 '(#:tests? #f))
1779 (home-page "https://coverage.readthedocs.io")
1780 (synopsis "Code coverage measurement for Python")
1781 (description
1782 "Coverage measures code coverage, typically during test execution. It
1783 uses the code analysis tools and tracing hooks provided in the Python standard
1784 library to determine which lines are executable, and which have been
1785 executed.")
1786 (license license:bsd-3)))
1787
1788 (define-public python2-coverage
1789 (package-with-python2 python-coverage))
1790
1791 (define-public python-pytest-asyncio
1792 (package
1793 (name "python-pytest-asyncio")
1794 (version "0.17.2")
1795 (source
1796 (origin
1797 (method git-fetch) ;for tests
1798 (uri (git-reference
1799 (url "https://github.com/pytest-dev/pytest-asyncio")
1800 (commit (string-append "v" version))))
1801 (file-name (git-file-name name version))
1802 (sha256
1803 (base32 "0sl0ckc23m40q6r2xcidsizrgqbbsfa7rwmr80fss359xsydf073"))))
1804 (build-system python-build-system)
1805 (arguments
1806 (list #:phases
1807 #~(modify-phases %standard-phases
1808 (add-after 'unpack 'pretend-version
1809 (lambda _
1810 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION"
1811 #$(package-version this-package))))
1812 (replace 'check
1813 (lambda* (#:key tests? #:allow-other-keys)
1814 (invoke "pytest" "-vv" "tests"))))))
1815 (native-inputs
1816 (list python-async-generator
1817 python-flaky
1818 python-hypothesis
1819 python-pytest
1820 python-setuptools-scm))
1821 (home-page "https://github.com/pytest-dev/pytest-asyncio")
1822 (synopsis "Pytest support for asyncio")
1823 (description "Python asyncio code is usually written in the form of
1824 coroutines, which makes it slightly more difficult to test using normal
1825 testing tools. @code{pytest-asyncio} provides useful fixtures and markers
1826 to make testing async code easier.")
1827 (license license:asl2.0)))
1828
1829 (define-public python-cov-core
1830 (package
1831 (name "python-cov-core")
1832 (version "1.15.0")
1833 (source
1834 (origin
1835 (method url-fetch)
1836 (uri (pypi-uri "cov-core" version))
1837 (sha256
1838 (base32
1839 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
1840 (build-system python-build-system)
1841 (propagated-inputs
1842 (list python-coverage))
1843 (home-page "https://github.com/schlamar/cov-core")
1844 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
1845 (description
1846 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
1847 and @code{nose2-cov}. It is useful for developing coverage plugins for these
1848 testing frameworks.")
1849 (license license:expat)))
1850
1851 (define-public python2-cov-core
1852 (package-with-python2 python-cov-core))
1853
1854 (define-public python-codecov
1855 (package
1856 (name "python-codecov")
1857 (version "2.0.15")
1858 (source
1859 (origin
1860 (method url-fetch)
1861 (uri (pypi-uri "codecov" version))
1862 (sha256
1863 (base32
1864 "1217c0vqf7ii65635gvl27a5pfhv0r7zhrpdp9cx640hg73bgn4f"))))
1865 (build-system python-build-system)
1866 (native-inputs
1867 (list python-unittest2))
1868 (propagated-inputs
1869 (list python-coverage python-requests))
1870 (home-page "https://github.com/codecov/codecov-python")
1871 (synopsis "Upload code coverage reports to @code{codecov.io}")
1872 (description
1873 "Codecov collects code coverage reports from code written in Python, Java,
1874 C/C++, R, and more, and uploads it to the @code{codecov.io} service.")
1875 (license license:asl2.0)))
1876
1877 (define-public python-testpath
1878 (package
1879 (name "python-testpath")
1880 (version "0.5.0")
1881 (source
1882 (origin
1883 (method git-fetch)
1884 (uri (git-reference
1885 (url "https://github.com/jupyter/testpath")
1886 (commit version)))
1887 (file-name (git-file-name name version))
1888 (sha256
1889 (base32
1890 "08r1c6bhvj8pcdvzkqv1950k36a6q3v81fd2p1yqdq3c07mcwgif"))))
1891 (build-system python-build-system)
1892 (arguments
1893 (list
1894 #:phases
1895 #~(modify-phases %standard-phases
1896 (add-after 'unpack 'relax-requirements
1897 (lambda _
1898 (substitute* "pyproject.toml"
1899 (("flit_core >=3.2.0,<3.3")
1900 "flit_core >=3.2.0"))))
1901 ;; XXX: PEP 517 manual build copied from python-isort.
1902 (replace 'build
1903 (lambda _
1904 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
1905 (replace 'check
1906 (lambda* (#:key tests? #:allow-other-keys)
1907 (when tests?
1908 (invoke "pytest"))))
1909 (replace 'install
1910 (lambda _
1911 (let ((whl (car (find-files "dist" "\\.whl$"))))
1912 (invoke "pip" "--no-cache-dir" "--no-input"
1913 "install" "--no-deps" "--prefix" #$output whl)))))))
1914 (native-inputs
1915 (list python-pypa-build python-flit-core python-pytest))
1916 (home-page "https://github.com/jupyter/testpath")
1917 (synopsis "Test utilities for code working with files and commands")
1918 (description
1919 "Testpath is a collection of utilities for Python code working with files
1920 and commands. It contains functions to check things on the file system, and
1921 tools for mocking system commands and recording calls to those.")
1922 (license license:expat)))
1923
1924 (define-public python-testlib
1925 (package
1926 (name "python-testlib")
1927 (version "0.6.5")
1928 (source
1929 (origin
1930 (method url-fetch)
1931 (uri (pypi-uri "testlib" version ".zip"))
1932 (sha256
1933 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
1934 (build-system python-build-system)
1935 (native-inputs
1936 (list unzip)) ; for unpacking the source
1937 (synopsis "Python micro test suite harness")
1938 (description "A micro unittest suite harness for Python.")
1939 (home-page "https://github.com/trentm/testlib")
1940 (license license:expat)))
1941
1942 (define-public python2-testlib
1943 (package-with-python2 python-testlib))
1944
1945 ;;; The software provided by this package was integrated into pytest 2.8.
1946 (define-public python-pytest-cache
1947 (package
1948 (name "python-pytest-cache")
1949 (version "1.0")
1950 (source (origin
1951 (method url-fetch)
1952 (uri (pypi-uri "pytest-cache" version))
1953 (sha256
1954 (base32
1955 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
1956 (build-system python-build-system)
1957 (propagated-inputs
1958 (list python-apipkg python-execnet python-py python-pytest))
1959 (synopsis "Py.test plugin with mechanisms for caching across test runs")
1960 (description "The pytest-cache plugin provides tools to rerun failures from
1961 the last py.test invocation.")
1962 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
1963 (license license:expat)))
1964
1965 (define-public python2-pytest-cache
1966 (package-with-python2 python-pytest-cache))
1967
1968 (define-public python-pytest-localserver
1969 (package
1970 (name "python-pytest-localserver")
1971 (version "0.5.0")
1972 (source (origin
1973 (method url-fetch)
1974 (uri (pypi-uri "pytest-localserver" version))
1975 (sha256
1976 (base32
1977 "1hpgpxrpfq5c731ndnsay2lc0y9nh2wy9fn1f83s3z8xkn82fm1s"))))
1978 (build-system python-build-system)
1979 (arguments
1980 '(#:phases
1981 (modify-phases %standard-phases
1982 (replace 'check
1983 (lambda _
1984 (invoke "py.test" "-v"))))))
1985 (native-inputs
1986 (list python-pytest python-requests python-six))
1987 (propagated-inputs
1988 (list python-werkzeug))
1989 (synopsis "Py.test plugin to test server connections locally")
1990 (description "Pytest-localserver is a plugin for the pytest testing
1991 framework which enables you to test server connections locally.")
1992 (home-page "https://pypi.org/project/pytest-localserver/")
1993 (license license:expat)))
1994
1995 (define-public python-pytest-xprocess
1996 (package
1997 (name "python-pytest-xprocess")
1998 (version "0.18.1")
1999 (source (origin
2000 (method url-fetch)
2001 (uri (pypi-uri "pytest-xprocess" version))
2002 (sha256
2003 (base32
2004 "0rm2rchrr63imn44xk5slwydxf8gvy579524qcxq7dc42pnk17zx"))))
2005 (build-system python-build-system)
2006 (native-inputs
2007 (list python-setuptools-scm))
2008 (propagated-inputs
2009 (list python-pytest python-psutil))
2010 (synopsis "Pytest plugin to manage external processes across test runs")
2011 (description "Pytest-xprocess is an experimental py.test plugin for managing
2012 processes across test runs.")
2013 (home-page "https://github.com/pytest-dev/pytest-xprocess/")
2014 (license license:expat)))
2015
2016 (define-public python-pytest-subtesthack
2017 (package
2018 (name "python-pytest-subtesthack")
2019 (version "0.1.1")
2020 (source (origin
2021 (method url-fetch)
2022 (uri (pypi-uri "pytest-subtesthack" version))
2023 (sha256
2024 (base32
2025 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
2026 (build-system python-build-system)
2027 (propagated-inputs
2028 (list python-pytest))
2029 (synopsis "Set-up and tear-down fixtures for unit tests")
2030 (description "This plugin allows you to set up and tear down fixtures within
2031 unit test functions that use @code{py.test}. This is useful for using
2032 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
2033 function multiple times, without setting up or tearing down fixture state as is
2034 normally the case.")
2035 (home-page "https://github.com/untitaker/pytest-subtesthack/")
2036 (license license:unlicense)))
2037
2038 (define-public python2-pytest-subtesthack
2039 (package-with-python2 python-pytest-subtesthack))
2040
2041 (define-public python-pytest-sugar
2042 (package
2043 (name "python-pytest-sugar")
2044 (version "0.9.3")
2045 (source
2046 (origin
2047 (method url-fetch)
2048 (uri (pypi-uri "pytest-sugar" version))
2049 (sha256
2050 (base32 "1i0hv3h49zvl62jbiyjag84carbrp3zprqzxffdr291nxavvac0n"))))
2051 (build-system python-build-system)
2052 (propagated-inputs
2053 (list python-packaging python-pytest python-termcolor))
2054 (home-page "https://pivotfinland.com/pytest-sugar/")
2055 (synopsis "Plugin for pytest that changes the default look and feel")
2056 (description
2057 "@code{pytest-sugar} is a plugin for py.test that changes the default
2058 look and feel of py.test, using a progress bar and showing failures and errors
2059 instantly.")
2060 (license license:bsd-3)))
2061
2062 (define-public python-hypothesis
2063 (package
2064 (name "python-hypothesis")
2065 (version "6.0.2")
2066 (source (origin
2067 (method url-fetch)
2068 (uri (pypi-uri "hypothesis" version))
2069 (sha256
2070 (base32
2071 "0wj7ip779naf2n076nylf2gi0sjz68z1ir9d9r2rgs7br18naqdf"))))
2072 (build-system python-build-system)
2073 (arguments
2074 ;; XXX: Tests are not distributed with the PyPI archive.
2075 '(#:tests? #f))
2076 (propagated-inputs
2077 `(("python-attrs" ,python-attrs-bootstrap)
2078 ("python-sortedcontainers" ,python-sortedcontainers)))
2079 (synopsis "Library for property based testing")
2080 (description "Hypothesis is a library for testing your Python code against a
2081 much larger range of examples than you would ever want to write by hand. It’s
2082 based on the Haskell library, Quickcheck, and is designed to integrate
2083 seamlessly into your existing Python unit testing work flow.")
2084 (home-page "https://github.com/HypothesisWorks/hypothesis-python")
2085 (license license:mpl2.0)
2086 (properties `((python2-variant . ,(delay python2-hypothesis))))))
2087
2088 (define-public python-hypothesis-6.23
2089 (package
2090 (inherit python-hypothesis)
2091 (version "6.23.4")
2092 (source (origin
2093 (method url-fetch)
2094 (uri (pypi-uri "hypothesis" version))
2095 (sha256
2096 (base32
2097 "0wp8i9qmd5wl1sq1l2b97fgliyk5fyphssl6j7q5qn5zjlfgi4qs"))))))
2098
2099 ;; This is the last version of Hypothesis that supports Python 2.
2100 (define-public python2-hypothesis
2101 (let ((hypothesis (package-with-python2
2102 (strip-python2-variant python-hypothesis))))
2103 (package (inherit hypothesis)
2104 (version "4.57.1")
2105 (source (origin
2106 (method url-fetch)
2107 (uri (pypi-uri "hypothesis" version))
2108 (sha256
2109 (base32
2110 "183gpxbfcdhdqzlahkji5a71n6lmvgqsbkcb0ihqad51n2j6jhrw"))))
2111 (propagated-inputs
2112 (modify-inputs (package-propagated-inputs hypothesis)
2113 (prepend python2-enum34))))))
2114
2115 (define-public python-hypothesmith
2116 (package
2117 (name "python-hypothesmith")
2118 (version "0.1.8")
2119 (source
2120 (origin
2121 (method url-fetch)
2122 (uri (pypi-uri "hypothesmith" version))
2123 (sha256
2124 (base32
2125 "02j101m5grjrbvrgjap17jsxd1hgawkylmyswcn33vf42mxh9zzr"))))
2126 (build-system python-build-system)
2127 (propagated-inputs
2128 (list python-hypothesis python-lark-parser python-libcst-minimal))
2129 (home-page "https://github.com/Zac-HD/hypothesmith")
2130 (synopsis "Strategies for generating Python programs")
2131 (description
2132 "This package contains hypothesis strategies for generating Python
2133 programs, something like CSmith, a random generator of C programs.")
2134 (license license:mpl2.0)))
2135
2136 (define-public python-lit
2137 (package
2138 (name "python-lit")
2139 (version "12.0.1")
2140 (source
2141 (origin
2142 (method url-fetch)
2143 (uri (pypi-uri "lit" version))
2144 (sha256
2145 (base32
2146 "01yggsb73s2gbq36xwifxl6k5ll5lkss5rwz59k9h3jnbnn7m5fj"))))
2147 (build-system python-build-system)
2148 (arguments
2149 `(#:phases
2150 (modify-phases %standard-phases
2151 (replace 'check
2152 (lambda _
2153 (invoke "python" "lit.py" "tests"))))))
2154 (native-inputs
2155 (list llvm))
2156 (home-page "https://llvm.org/")
2157 (synopsis "LLVM Software Testing Tool")
2158 (description "@code{lit} is a portable tool for executing LLVM and Clang
2159 style test suites, summarizing their results, and providing indication of
2160 failures.")
2161 (license license:ncsa)))
2162
2163 (define-public python-pytest-pep8
2164 (package
2165 (name "python-pytest-pep8")
2166 (version "1.0.6")
2167 (source (origin
2168 (method url-fetch)
2169 (uri (pypi-uri "pytest-pep8" version))
2170 (sha256
2171 (base32
2172 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
2173 (build-system python-build-system)
2174 (arguments
2175 `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
2176 #:phases
2177 (modify-phases %standard-phases
2178 (add-after 'unpack 'fix-dependencies
2179 (lambda _
2180 (substitute* "setup.py"
2181 (("'pytest-cache', ") "")))) ; Included in recent pytest
2182 (replace 'check
2183 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
2184 (when tests?
2185 (add-installed-pythonpath inputs outputs)
2186 (invoke "pytest" "-v")))))))
2187 (native-inputs
2188 (list python-pytest))
2189 (propagated-inputs
2190 (list python-pep8))
2191 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
2192 (synopsis "Py.test plugin to check PEP8 requirements")
2193 (description "Pytest plugin for checking PEP8 compliance.")
2194 (license license:expat)))
2195
2196 (define-public python2-pytest-pep8
2197 (package-with-python2 python-pytest-pep8))
2198
2199 (define-public python-pytest-flakes
2200 (package
2201 (name "python-pytest-flakes")
2202 (version "4.0.1")
2203 (source (origin
2204 (method url-fetch)
2205 (uri (pypi-uri "pytest-flakes" version))
2206 (sha256
2207 (base32
2208 "0045h3hnrkn2jwr42jgy2j98npx4amwr6wxzi9j0nppaqz33l49p"))))
2209 (build-system python-build-system)
2210 (arguments
2211 `(#:phases
2212 (modify-phases %standard-phases
2213 (delete 'check)
2214 (add-after 'install 'check
2215 (lambda* (#:key outputs inputs #:allow-other-keys)
2216 ;; It's easier to run tests after install.
2217 ;; Make installed package available for running the tests
2218 (add-installed-pythonpath inputs outputs)
2219 (invoke "py.test" "-vv" "-k" "not test_syntax_error"))))))
2220 (native-inputs
2221 (list python-coverage python-pytest python-pytest-cache
2222 python-pytest-pep8))
2223 (propagated-inputs
2224 (list python-pyflakes))
2225 (home-page "https://github.com/fschulze/pytest-flakes")
2226 (synopsis "Py.test plugin to check source code with pyflakes")
2227 (description "Pytest plugin for checking Python source code with pyflakes.")
2228 (license license:expat)))
2229
2230 (define-public python2-pytest-flakes
2231 (package-with-python2 python-pytest-flakes))
2232
2233 (define-public python-coverage-test-runner
2234 (package
2235 (name "python-coverage-test-runner")
2236 (version "1.15")
2237 (source
2238 (origin
2239 (method url-fetch)
2240 (uri (string-append
2241 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
2242 "coverage-test-runner/snapshot/coverage-test-runner-"
2243 version ".tar.gz"))
2244 (sha256
2245 (base32
2246 "1kjjb9llckycnfxag8zcvqsn4z1s3dwyw6b1n0avxydihgf30rny"))))
2247 (build-system python-build-system)
2248 (arguments
2249 `(#:phases
2250 (modify-phases %standard-phases
2251 (replace 'check
2252 (lambda _
2253 (invoke "./testrun"))))))
2254 (propagated-inputs
2255 (list python-coverage))
2256 (home-page "https://liw.fi/coverage-test-runner/")
2257 (synopsis "Python module for running unit tests")
2258 (description "@code{CoverageTestRunner} is a python module for running
2259 unit tests and failing them if the unit test module does not exercise all
2260 statements in the module it tests.")
2261 (license license:gpl3+)))
2262
2263 (define-public python2-coverage-test-runner
2264 (package-with-python2 python-coverage-test-runner))
2265
2266 (define-public python-pylint
2267 (package
2268 (name "python-pylint")
2269 (version "2.12.2")
2270 (source
2271 (origin
2272 (method git-fetch)
2273 (uri (git-reference
2274 (url "https://github.com/PyCQA/pylint")
2275 (commit (string-append "v" version))))
2276 (file-name (git-file-name name version))
2277 (sha256
2278 (base32 "0spmy7j1vvh55shzgma80q61y0d1cj45dcgslb4g5w3y602miq5i"))))
2279 (build-system python-build-system)
2280 (arguments
2281 `(#:phases
2282 (modify-phases %standard-phases
2283 (replace 'check
2284 (lambda* (#:key tests? #:allow-other-keys)
2285 (when tests?
2286 ;; The unused but collected 'primer'-related test files require
2287 ;; the extraneous 'git' Python module; remove them.
2288 (delete-file "tests/primer/test_primer_external.py")
2289 (delete-file "tests/testutils/test_package_to_lint.py")
2290 (setenv "HOME" "/tmp")
2291 (invoke "pytest" "-k" "test_functional")))))))
2292 (native-inputs
2293 (list python-pytest))
2294 (propagated-inputs
2295 (list python-astroid
2296 python-isort
2297 python-mccabe
2298 python-platformdirs
2299 python-toml
2300 python-typing-extensions))
2301 (home-page "https://github.com/PyCQA/pylint")
2302 (synopsis "Advanced Python code static checker")
2303 (description "Pylint is a Python source code analyzer which looks
2304 for programming errors, helps enforcing a coding standard and sniffs
2305 for some code smells (as defined in Martin Fowler's Refactoring book).
2306
2307 Pylint has many rules enabled by default, way too much to silence them
2308 all on a minimally sized program. It's highly configurable and handle
2309 pragmas to control it from within your code. Additionally, it is
2310 possible to write plugins to add your own checks.")
2311 (license license:gpl2+)))
2312
2313 (define-public python-paramunittest
2314 (package
2315 (name "python-paramunittest")
2316 (version "0.2")
2317 (source
2318 (origin
2319 (method url-fetch)
2320 (uri (pypi-uri "ParamUnittest" version))
2321 (sha256
2322 (base32
2323 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
2324 (build-system python-build-system)
2325 (home-page
2326 "https://github.com/rik0/ParamUnittest")
2327 (synopsis
2328 "Simple extension to have parametrized unit tests")
2329 (description
2330 "This package creates parameterized unit-tests that work with the standard
2331 unittest package. A parameterized test case is automatically converted to multiple test
2332 cases. Since they are TestCase subclasses, they work with other test suites that
2333 recognize TestCases.")
2334 (license license:bsd-2)))
2335
2336 (define-public python2-python-paramunittest
2337 (package-with-python2 python-paramunittest))
2338
2339 (define-public python-pytest-warnings
2340 (package
2341 (name "python-pytest-warnings")
2342 (version "0.2.0")
2343 (source
2344 (origin
2345 (method url-fetch)
2346 (uri (pypi-uri "pytest-warnings" version))
2347 (sha256
2348 (base32
2349 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
2350 (build-system python-build-system)
2351 (propagated-inputs
2352 (list python-pytest))
2353 (home-page "https://github.com/fschulze/pytest-warnings")
2354 (synopsis "Pytest plugin to list Python warnings in pytest report")
2355 (description
2356 "Python-pytest-warnings is a pytest plugin to list Python warnings in
2357 pytest report.")
2358 (license license:expat)
2359 (properties `((python2-variant . ,(delay python2-pytest-warnings))
2360 ;; This package is part of pytest as of version 3.1.0.
2361 (superseded . ,python-pytest)))))
2362
2363 (define-public python2-pytest-warnings
2364 (package (inherit (package-with-python2
2365 (strip-python2-variant python-pytest-warnings)))
2366 (properties `((superseded . ,python2-pytest)))))
2367
2368 (define-public python-pytest-capturelog
2369 (package
2370 (name "python-pytest-capturelog")
2371 (version "0.7")
2372 (source
2373 (origin
2374 (method url-fetch)
2375 (uri (pypi-uri "pytest-capturelog" version ".tar.gz"))
2376 (sha256
2377 (base32
2378 "038049nyjl7di59ycnxvc9nydivc5m8np3hqq84j2iirkccdbs5n"))))
2379 (build-system python-build-system)
2380 (propagated-inputs
2381 (list python-pytest))
2382 (home-page "https://bitbucket.org/memedough/pytest-capturelog/overview")
2383 (synopsis "Pytest plugin to catch log messages")
2384 (description
2385 "Python-pytest-catchlog is a pytest plugin to catch log messages.")
2386 (license license:expat)))
2387
2388 (define-public python2-pytest-capturelog
2389 (package-with-python2 python-pytest-capturelog))
2390
2391 (define-public python-pytest-catchlog
2392 (package
2393 (name "python-pytest-catchlog")
2394 (version "1.2.2")
2395 (source
2396 (origin
2397 (method url-fetch)
2398 (uri (pypi-uri "pytest-catchlog" version ".zip"))
2399 (sha256
2400 (base32
2401 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
2402 (build-system python-build-system)
2403 (native-inputs
2404 (list unzip))
2405 (propagated-inputs
2406 (list python-pytest))
2407 (home-page "https://github.com/eisensheng/pytest-catchlog")
2408 (synopsis "Pytest plugin to catch log messages")
2409 (description
2410 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
2411 a fork of pytest-capturelog.")
2412 (license license:expat)))
2413
2414 (define-public python2-pytest-catchlog
2415 (package-with-python2 python-pytest-catchlog))
2416
2417 (define-public python-nosexcover
2418 (package
2419 (name "python-nosexcover")
2420 (version "1.0.11")
2421 (source (origin
2422 (method url-fetch)
2423 (uri (pypi-uri "nosexcover" version))
2424 (sha256
2425 (base32
2426 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
2427 (build-system python-build-system)
2428 (propagated-inputs
2429 (list python-coverage python-nose))
2430 (home-page "https://github.com/cmheisel/nose-xcover")
2431 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
2432 (description "Nose-xcover is a companion to the built-in
2433 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
2434 to a file named coverage.xml.
2435
2436 It will honor all the options you pass to the Nose coverage plugin,
2437 especially -cover-package.")
2438 (license license:expat)))
2439
2440 (define-public python2-nosexcover
2441 (package-with-python2 python-nosexcover))
2442
2443 (define-public python-discover
2444 (package
2445 (name "python-discover")
2446 (version "0.4.0")
2447 (source
2448 (origin
2449 (method url-fetch)
2450 (uri (pypi-uri "discover" version))
2451 (sha256
2452 (base32
2453 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2454 (build-system python-build-system)
2455 (home-page "https://pypi.org/project/discover/")
2456 (synopsis
2457 "Python test discovery for unittest")
2458 (description
2459 "Discover provides test discovery for unittest, a feature that has been
2460 backported from Python 2.7 for Python 2.4+.")
2461 (license license:bsd-3)))
2462
2463 (define-public python2-discover
2464 (package-with-python2 python-discover))
2465
2466 (define-public behave
2467 (package
2468 (name "behave")
2469 ;; The 1.2.6 release from 2018 has several problems with newer Python
2470 ;; versions, so we package a recent snapshot.
2471 (version "1.2.7.dev2")
2472 (source (origin
2473 (method git-fetch)
2474 (uri (git-reference
2475 (url "https://github.com/behave/behave")
2476 (commit (string-append "v" version))))
2477 (file-name (git-file-name name version))
2478 (sha256
2479 (base32
2480 "0sv94wagi214h0l91zn8m04f78x5wn83vqxib81hnl1qahvx9hq7"))))
2481 (build-system python-build-system)
2482 (arguments
2483 '(#:phases (modify-phases %standard-phases
2484 (replace 'check
2485 (lambda* (#:key tests? #:allow-other-keys)
2486 (when tests?
2487 (invoke "pytest" "-c" "/dev/null" "-vv")))))))
2488 (native-inputs
2489 (list python-mock python-nose python-pathpy python-pyhamcrest
2490 python-pytest))
2491 (propagated-inputs
2492 (list python-colorama
2493 python-cucumber-tag-expressions
2494 python-parse
2495 python-parse-type))
2496 (home-page "https://github.com/behave/behave")
2497 (synopsis "Python behavior-driven development")
2498 (description
2499 "Behave is a tool for behavior-driven development in python.
2500 Behavior-driven development (or BDD) is an agile software development
2501 technique that encourages collaboration between developers, QA and
2502 non-technical or business participants in a software project. Behave uses
2503 tests written in a natural language style, backed up by Python code.")
2504 (license license:x11)))
2505
2506 (define-public python-behave-web-api
2507 (package
2508 (name "python-behave-web-api")
2509 (version "1.0.6")
2510 (source
2511 (origin
2512 (method url-fetch)
2513 (uri (pypi-uri "behave-web-api" version))
2514 (sha256
2515 (base32
2516 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
2517 (build-system python-build-system)
2518 (arguments
2519 `(#:phases
2520 (modify-phases %standard-phases
2521 (add-after 'unpack 'fix-dependencies
2522 (lambda _
2523 (substitute* "setup.py"
2524 (("'wheel'") "") ; We don't use it.
2525 (("'ordereddict==1.1'") "")) ; Python >= 2.7 has it built-in.
2526 #t)))))
2527 (propagated-inputs
2528 (list behave python-requests))
2529 (home-page "https://github.com/jefersondaniel/behave-web-api")
2530 (synopsis "Provides testing for JSON APIs with Behave for Python")
2531 (description "This package provides testing utility modules for testing
2532 JSON APIs with Behave.")
2533 (license license:expat)))
2534
2535 (define-public python-rednose
2536 (package
2537 (name "python-rednose")
2538 (version "1.2.3")
2539 (source
2540 (origin
2541 (method url-fetch)
2542 (uri (pypi-uri "rednose" version))
2543 (sha256
2544 (base32
2545 "11x5nx5b4wdq04s7vj1gcdl07jvvkfb37p0r5lg773gr5rr8mj6h"))))
2546 (build-system python-build-system)
2547 (arguments
2548 `(#:phases (modify-phases %standard-phases
2549 (add-after 'unpack 'patch-setup.py
2550 (lambda _
2551 ;; Six is only required for tests and later versions
2552 ;; work fine.
2553 (substitute* "setup.py"
2554 (("six==1.10.0") "six"))
2555 #t)))))
2556 (propagated-inputs
2557 (list python-colorama python-termstyle))
2558 (native-inputs
2559 (list python-six python-nose))
2560 (home-page "https://github.com/JBKahn/rednose")
2561 (synopsis "Colored output for Python nosetests")
2562 (description "This package provides colored output for the
2563 @command{nosetests} command of the Python Nose unit test framework.")
2564 (license license:bsd-3)))
2565
2566 (define-public python2-rednose
2567 (package-with-python2 python-rednose))
2568
2569 (define-public python-nose-random
2570 (package
2571 (name "python-nose-random")
2572 (version "1.0.0")
2573 (source
2574 (origin
2575 (method git-fetch)
2576 (uri (git-reference
2577 (url "https://github.com/fzumstein/nose-random")
2578 (commit version)))
2579 (file-name (git-file-name name version))
2580 (sha256
2581 (base32
2582 "1dvip61r2frjv35mv6mmfjc07402z73pjbndfp3mhxyjn2zhksw2"))))
2583 (build-system python-build-system)
2584 (native-inputs
2585 (list python-nose))
2586 (home-page "https://github.com/fzumstein/nose-random")
2587 (synopsis "Nose plugin to facilitate randomized unit testing with
2588 Python")
2589 (description "Python nose-random is designed to facilitate
2590 Monte-Carlo style unit testing. The idea is to improve testing by
2591 running your code against a large number of randomly generated input
2592 scenarios.")
2593 (license license:expat)))
2594
2595 (define-public python-nose-randomly
2596 (package
2597 (name "python-nose-randomly")
2598 (version "1.2.6")
2599 (source
2600 (origin
2601 (method url-fetch)
2602 (uri (pypi-uri "nose-randomly" version))
2603 (sha256
2604 (base32 "0z662rqhfk4bjmg806mn4frb8nz4gbh7mrddsrhfffp1g4yklj3y"))))
2605 (build-system python-build-system)
2606 (native-inputs
2607 (list python-nose python-numpy))
2608 (home-page "https://github.com/adamchainz/nose-randomly")
2609 (synopsis
2610 "Nose plugin to randomly order tests and control random.seed")
2611 (description
2612 "This is a @code{Nose} plugin to randomly order tests which can be quite
2613 powerful in discovering hidden flaws in the tests themselves, while helping to
2614 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
2615 by resetting it to a repeatable number for each test, enabling the tests to
2616 create data based on random numbers and yet remain repeatable.")
2617 (license license:bsd-3)))
2618
2619 (define-public python2-nose-randomly
2620 (package-with-python2 python-nose-randomly))
2621
2622 (define-public python-nose-timer
2623 (package
2624 (name "python-nose-timer")
2625 (version "0.7.5")
2626 (source
2627 (origin
2628 (method url-fetch)
2629 (uri (pypi-uri "nose-timer" version))
2630 (sha256
2631 (base32 "05wzkc88vbzw62pqkvhl33211b90kns0lny70b7qw62rcg4flzk4"))))
2632 (build-system python-build-system)
2633 (propagated-inputs
2634 (list python-nose python-termcolor))
2635 (home-page "https://github.com/mahmoudimus/nose-timer")
2636 (synopsis "Timer plugin for nosetests")
2637 (description "Shows how much time was needed to run individual tests.")
2638 (license license:expat)))
2639
2640 (define-public python2-nose-timer
2641 (package-with-python2 python-nose-timer))
2642
2643 (define-public python-freezegun
2644 (package
2645 (name "python-freezegun")
2646 (version "0.3.14")
2647 (source
2648 (origin
2649 (method url-fetch)
2650 (uri (pypi-uri "freezegun" version))
2651 (sha256
2652 (base32 "0al75mk829j1izxi760b7yjnknjihyfhp2mvi5qiyrxb9cpxwqk2"))))
2653 (build-system python-build-system)
2654 (native-inputs
2655 (list python-mock python-pytest))
2656 (propagated-inputs
2657 (list python-six python-dateutil))
2658 (arguments
2659 `(#:phases
2660 (modify-phases %standard-phases
2661 ;; The tests are normally executed via `make test`, but the PyPi
2662 ;; package does not include the Makefile.
2663 (replace 'check
2664 (lambda _
2665 (invoke "pytest" "-vv"))))))
2666 (home-page "https://github.com/spulec/freezegun")
2667 (synopsis "Test utility for mocking the datetime module")
2668 (description
2669 "FreezeGun is a library that allows your python tests to travel through
2670 time by mocking the datetime module.")
2671 (license license:asl2.0)))
2672
2673 (define-public python2-freezegun
2674 (package-with-python2 python-freezegun))
2675
2676 (define-public python-flexmock
2677 (package
2678 (name "python-flexmock")
2679 (version "0.10.4")
2680 (source (origin
2681 (method url-fetch)
2682 (uri (pypi-uri "flexmock" version))
2683 (sha256
2684 (base32
2685 "0b6qw3grhgx58kxlkj7mdma7xdvlj02zabvcf7w2qifnfjwwwcsh"))))
2686 (build-system python-build-system)
2687 (home-page "https://flexmock.readthedocs.org")
2688 (synopsis "Testing library for Python")
2689 (description
2690 "flexmock is a testing library for Python that makes it easy to create
2691 mocks, stubs and fakes.")
2692 (license license:bsd-3)))
2693
2694 (define-public python2-flexmock
2695 (package-with-python2 python-flexmock))
2696
2697 (define-public python-flaky
2698 (package
2699 (name "python-flaky")
2700 (version "3.5.3")
2701 (source (origin
2702 (method url-fetch)
2703 (uri (pypi-uri "flaky" version))
2704 (sha256
2705 (base32
2706 "1nm1kjf857z5aw7v642ffsy1vwf255c6wjvmil71kckjyd0mxg8j"))))
2707 (build-system python-build-system)
2708 (arguments
2709 ;; TODO: Tests require 'coveralls' and 'genty' which are not in Guix yet.
2710 '(#:tests? #f))
2711 (home-page "https://github.com/box/flaky")
2712 (synopsis "Automatically rerun flaky tests")
2713 (description
2714 "Flaky is a plugin for @code{nose} or @code{py.test} that automatically
2715 reruns flaky tests.
2716
2717 Ideally, tests reliably pass or fail, but sometimes test fixtures must rely
2718 on components that aren't 100% reliable. With flaky, instead of removing
2719 those tests or marking them to @code{@@skip}, they can be automatically
2720 retried.")
2721 (license license:asl2.0)))
2722
2723 (define-public python2-flaky
2724 (package-with-python2 python-flaky))
2725
2726 (define-public python-pyhamcrest
2727 (package
2728 (name "python-pyhamcrest")
2729 (version "2.0.2")
2730 (source (origin
2731 (method git-fetch) ;no tests in PyPI archive
2732 (uri (git-reference
2733 (url "https://github.com/hamcrest/PyHamcrest")
2734 (commit (string-append "V" version))))
2735 (file-name (git-file-name name version))
2736 (sha256
2737 (base32
2738 "05kdzlhs2kvj82pfca13qszszcj6dyrk4b9pbr46x06sq2s4qyls"))))
2739 (native-inputs ;all native inputs are for tests
2740 (list python-pytest-cov python-mock python-pytest python-hypothesis))
2741 (build-system python-build-system)
2742 (arguments
2743 `(#:phases (modify-phases %standard-phases
2744 (replace 'check
2745 (lambda* (#:key inputs outputs #:allow-other-keys)
2746 (add-installed-pythonpath inputs outputs)
2747 (invoke "pytest" "-vv"))))))
2748 (home-page "http://hamcrest.org/")
2749 (synopsis "Hamcrest matchers for Python")
2750 (description "PyHamcrest is a framework for writing matcher objects,
2751 allowing you to declaratively define \"match\" rules.")
2752 (license license:bsd-3)))
2753
2754 (define-public unittest-cpp
2755 (package
2756 (name "unittest-cpp")
2757 (version "2.0.0")
2758 (source (origin
2759 (method git-fetch)
2760 (uri (git-reference
2761 (url "https://github.com/unittest-cpp/unittest-cpp")
2762 (commit (string-append "v" version))))
2763 (file-name (git-file-name name version))
2764 (sha256
2765 (base32 "0sxb3835nly1jxn071f59fwbdzmqi74j040r81fanxyw3s1azw0i"))))
2766 (arguments
2767 `(#:tests? #f)) ; It's run after build automatically.
2768 (build-system cmake-build-system)
2769 (home-page "https://github.com/unittest-cpp/unittest-cpp")
2770 (synopsis "Lightweight unit testing framework for C++")
2771 (description "UnitTest++ is a lightweight unit testing framework for C++.
2772 It was designed to do test-driven development on a wide variety of platforms.
2773 Simplicity, portability, speed, and small footprint are all very important
2774 aspects of UnitTest++. UnitTest++ is mostly standard C++ and makes minimal use
2775 of advanced library and language features, which means it should be easily
2776 portable to just about any platform.")
2777 (license license:expat)))
2778
2779 (define-public libfaketime
2780 (package
2781 (name "libfaketime")
2782 (version "0.9.9")
2783 (home-page "https://github.com/wolfcw/libfaketime")
2784 (source (origin
2785 (method git-fetch)
2786 (uri (git-reference
2787 (url home-page)
2788 (commit (string-append "v" version))))
2789 (sha256
2790 (base32
2791 "1gi1xciqga5hl2xlk7rc3j8wy47ag97pi7ngmdl6ny1d11b2wn1z"))
2792 (file-name (git-file-name name version))))
2793 (build-system gnu-build-system)
2794 (arguments
2795 `(#:phases (modify-phases %standard-phases
2796 (add-after 'unpack 'embed-date-reference
2797 (lambda* (#:key inputs #:allow-other-keys)
2798 (let ((coreutils (assoc-ref inputs "coreutils")))
2799 (substitute* "src/faketime.c"
2800 (("\"date\"")
2801 (string-append "\"" coreutils "/bin/date\""))))))
2802 (replace 'configure
2803 (lambda* (#:key outputs #:allow-other-keys)
2804 (let ((out (assoc-ref outputs "out")))
2805 (setenv "CC" ,(cc-for-target))
2806 (setenv "PREFIX" out)
2807
2808 ;; XXX: Without this flag, the CLOCK_REALTIME test hangs
2809 ;; indefinitely. See README.packagers for more information.
2810 ;; There are specific instructions to not enable more flags
2811 ;; than absolutely needed.
2812 ,(if (or (target-ppc64le?)
2813 (target-riscv64?))
2814 `(setenv "FAKETIME_COMPILE_CFLAGS"
2815 "-DFORCE_MONOTONIC_FIX -DFORCE_PTHREAD_NONVER")
2816 `(setenv "FAKETIME_COMPILE_CFLAGS"
2817 "-DFORCE_MONOTONIC_FIX")))))
2818 (add-before 'check 'pre-check
2819 (lambda _
2820 (substitute* "test/functests/test_exclude_mono.sh"
2821 (("/bin/bash") (which "bash"))))))
2822 #:test-target "test"))
2823 (native-inputs
2824 (list perl)) ;for tests
2825 (inputs
2826 (list coreutils))
2827 (synopsis "Fake the system time for single applications")
2828 (description
2829 "The libfaketime library allows users to modify the system time that an
2830 application \"sees\". It is meant to be loaded using the dynamic linker's
2831 @code{LD_PRELOAD} environment variable. The @command{faketime} command
2832 provides a simple way to achieve this.")
2833 (license license:gpl2)))
2834
2835 (define-public umockdev
2836 (package
2837 (name "umockdev")
2838 (version "0.14.4")
2839 (source (origin
2840 (method url-fetch)
2841 (uri (string-append "https://github.com/martinpitt/umockdev/"
2842 "releases/download/" version "/"
2843 "umockdev-" version ".tar.xz"))
2844 (sha256
2845 (base32
2846 "0xmi24ckpps32k7hc139psgbsnsf4g106sv4l9m445m46amkxggd"))))
2847 (build-system gnu-build-system)
2848 (arguments
2849 `(#:phases
2850 (modify-phases %standard-phases
2851 (add-after 'unpack 'fix-test
2852 (lambda _
2853 (substitute* "tests/test-umockdev.c"
2854 (("/run") "/tmp"))
2855 #t)))))
2856 (native-inputs
2857 (list vala
2858 gobject-introspection
2859 gtk-doc/stable
2860 pkg-config
2861 ;; For tests.
2862 python
2863 which))
2864 (inputs
2865 (list glib eudev libgudev))
2866 (home-page "https://github.com/martinpitt/umockdev/")
2867 (synopsis "Mock hardware devices for creating unit tests")
2868 (description "umockdev mocks hardware devices for creating integration
2869 tests for hardware related libraries and programs. It also provides tools to
2870 record the properties and behaviour of particular devices, and to run a
2871 program or test suite under a test bed with the previously recorded devices
2872 loaded.")
2873 (license license:lgpl2.1+)))
2874
2875 (define-public virtest
2876 ;; No releases yet, so we take the commit that "vc" expects.
2877 (let ((commit "f7d03ef39fceba168745bd29e1b20af6e7971e04")
2878 (revision "0"))
2879 (package
2880 (name "virtest")
2881 (version (git-version "0.0" revision commit))
2882 (home-page "https://github.com/mattkretz/virtest")
2883 (source (origin
2884 (method git-fetch)
2885 (uri (git-reference (url home-page) (commit commit)))
2886 (file-name (git-file-name name version))
2887 (sha256
2888 (base32
2889 "07pjyb0mk7y2w1dg1bhl26nb7416xa1mw16ifj6mmps5y6aq054l"))))
2890 (build-system cmake-build-system)
2891 (arguments
2892 `(#:phases (modify-phases %standard-phases
2893 (add-after 'unpack 'adjust-install-directory
2894 (lambda _
2895 ;; Vc is the only consumer of this library, and expects
2896 ;; to find it in "virtest/vir/" instead of "vir/vir/".
2897 (substitute* "CMakeLists.txt"
2898 (("DESTINATION include/vir")
2899 "DESTINATION include/virtest"))
2900 #t)))))
2901 (synopsis "Header-only test framework")
2902 (description
2903 "@code{virtest} is a small header-only test framework for C++. It
2904 grew out of the @dfn{Vc} project.")
2905 (license license:bsd-3))))
2906
2907 (define-public python-pyfakefs
2908 (package
2909 (name "python-pyfakefs")
2910 (version "3.7.1")
2911 (source (origin
2912 (method url-fetch)
2913 ;; We use the PyPI URL because there is no proper release
2914 ;; available from GitHub. The GitHub project only provides
2915 ;; autogenerated tarballs, which are known to change in place.
2916 (uri (pypi-uri "pyfakefs" version))
2917 (sha256
2918 (base32
2919 "1cp2yw96fa2qkgi39xa3nlr3inf8wb5rgh9kdq53256ca2r8pdhy"))
2920 (patches (search-patches
2921 "python-pyfakefs-remove-bad-test.patch"))
2922 (file-name (string-append name "-" version ".tar.gz"))))
2923 (arguments
2924 `(#:phases
2925 (modify-phases %standard-phases
2926 (add-after 'unpack 'patch-testsuite
2927 (lambda _
2928 ;; Time difference is larger than expected.
2929 (substitute* "pyfakefs/tests/fake_filesystem_unittest_test.py"
2930 (("(\\s+)def test_copy_real_file" all indent)
2931 (string-append
2932 indent
2933 "@unittest.skip('disabled by guix')\n"
2934 all)))))
2935 ;; The default test suite does not run these extra tests.
2936 (add-after 'check 'check-pytest-plugin
2937 (lambda _
2938 (invoke
2939 "python" "-m" "pytest"
2940 "pyfakefs/pytest_tests/pytest_plugin_test.py"))))))
2941 (native-inputs
2942 (list python-pytest))
2943 (build-system python-build-system)
2944 ;; Guix lint doesn't like that this is a permanent redirect to the GitHub
2945 ;; page, but the pyfakefs documentation asks us to use this specific URL
2946 ;; when linking to the project. Honor their request.
2947 (home-page "http://pyfakefs.org/")
2948 ;; TRANSLATORS: In the synopsis, "Mock" is a verb.
2949 (synopsis "Mock file system interactions in tests")
2950 (description
2951 "This package provides a Python library intended for use in automated
2952 tests. One difficulty when testing software is that the code under test might
2953 need to read or write to files in the local file system. If the file system
2954 is not set up in just the right way, it might cause a spurious error during
2955 the test. The pyfakefs library provides a solution to problems like this by
2956 mocking file system interactions. In other words, it arranges for the code
2957 under test to interact with a fake file system instead of the real file
2958 system. The code under test requires no modification to work with pyfakefs.")
2959 (license license:asl2.0)))
2960
2961 ;; This minimal variant is used to avoid a circular dependency between
2962 ;; python2-importlib-metadata, which requires pyfakefs for its tests, and
2963 ;; python2-pytest, which requires python2-importlib-metadata.
2964 (define-public python2-pyfakefs-bootstrap
2965 (hidden-package
2966 (package
2967 (inherit (package-with-python2 python-pyfakefs))
2968 (name "python2-pyfakefs-bootstrap")
2969 (native-inputs '())
2970 (arguments
2971 `(#:python ,python-2
2972 #:tests? #f)))))
2973
2974 (define-public python-aiounittest
2975 (package
2976 (name "python-aiounittest")
2977 (version "1.4.0")
2978 ;; Pypi package lacks tests.
2979 (source
2980 (origin (method git-fetch)
2981 (uri (git-reference
2982 (url "https://github.com/kwarunek/aiounittest.git")
2983 (commit version)))
2984 (file-name (git-file-name name version))
2985 (sha256
2986 (base32
2987 "0hql5mw62lclrpblbh7xvinwjfcdcfvhhlvl7xlq2hi9isjq1c8r"))))
2988 (build-system python-build-system)
2989 (arguments
2990 '(#:phases (modify-phases %standard-phases
2991 (replace 'check
2992 (lambda* (#:key tests? #:allow-other-keys)
2993 (if tests?
2994 (invoke "nosetests" "-v")
2995 (format #t "test suite not run~%"))
2996 #t)))))
2997 (propagated-inputs (list python-wrapt))
2998 (native-inputs
2999 (list python-coverage python-nose))
3000 (home-page
3001 "https://github.com/kwarunek/aiounittest")
3002 (synopsis "Test asyncio code more easily")
3003 (description "Aiounittest is a library that helps write tests using
3004 asynchronous code in Python (asyncio).")
3005 (license license:expat)))
3006
3007 (define-public python-pytest-dependency
3008 (package
3009 (name "python-pytest-dependency")
3010 (version "0.5.1")
3011 (source
3012 (origin
3013 (method url-fetch)
3014 (uri (pypi-uri "pytest-dependency" version))
3015 (sha256
3016 (base32
3017 "0swl3mxca7nnjbb5grfzrm3fa2750h9vjsha0f2kyrljc6895a62"))))
3018 (build-system python-build-system)
3019 (propagated-inputs
3020 (list python-pytest))
3021 (home-page
3022 "https://github.com/RKrahl/pytest-dependency")
3023 (synopsis "Manage dependencies of tests")
3024 (description "This pytest plugin manages dependencies of tests. It allows
3025 to mark some tests as dependent from other tests. These tests will then be
3026 skipped if any of the dependencies did fail or has been skipped.")
3027 (license license:asl2.0)))
3028
3029 (define-public python-pytest-datadir
3030 (package
3031 (name "python-pytest-datadir")
3032 (version "1.3.1")
3033 (source
3034 (origin
3035 (method url-fetch)
3036 (uri (pypi-uri "pytest-datadir" version))
3037 (sha256
3038 (base32
3039 "066bg6wlzgq2pqnjp73dfrcmk8951xw3aqcxa3p1axgqimrixbyk"))))
3040 (build-system python-build-system)
3041 (native-inputs
3042 (list python-setuptools-scm))
3043 (propagated-inputs
3044 (list python-pytest python-wheel))
3045 (home-page "https://github.com/gabrielcnr/pytest-datadir")
3046 (synopsis "Pytest plugin for manipulating test data directories and files")
3047 (description
3048 "This package provides a Pytest plugin for manipulating test data
3049 directories and files.")
3050 (license license:expat)))
3051
3052 (define-public python-pytest-regressions
3053 (package
3054 (name "python-pytest-regressions")
3055 (version "2.2.0")
3056 (source
3057 (origin
3058 (method url-fetch)
3059 (uri (pypi-uri "pytest-regressions" version))
3060 (sha256
3061 (base32
3062 "05jpsvv8rj8i4x24fphpnar5dl4s6d6bw6ikjk5d8v96rdviz9qm"))))
3063 (build-system python-build-system)
3064 (propagated-inputs
3065 (list python-pytest-datadir python-pyyaml))
3066 (native-inputs
3067 (list python-matplotlib
3068 python-numpy
3069 python-pandas
3070 python-pillow
3071 python-pre-commit
3072 python-restructuredtext-lint
3073 python-tox
3074 python-setuptools-scm
3075 python-pytest))
3076 (home-page "https://github.com/ESSS/pytest-regressions")
3077 (synopsis "Easy to use fixtures to write regression tests")
3078 (description
3079 "This plugin makes it simple to test general data, images, files, and numeric
3080 tables by saving expected data in a data directory (courtesy of pytest-datadir)
3081 that can be used to verify that future runs produce the same data.")
3082 (license license:expat)))