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