1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2014 David Thompson <davet@gnu.org>
4 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
5 ;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
6 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
7 ;;; Copyright © 2015, 2017 Cyril Roelandt <tipecaml@gmail.com>
8 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
9 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
10 ;;; Copyright © 2015, 2016, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
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>
14 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
15 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
16 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
17 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
18 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
19 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
20 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
21 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
22 ;;; Copyright © 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
23 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
24 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
25 ;;; Copyright © 2017, 2019 Kei Kebreau <kkebreau@posteo.net>
26 ;;; Copyright © 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2015, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
28 ;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
29 ;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org>
30 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
31 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
32 ;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
34 ;;; This file is part of GNU Guix.
36 ;;; GNU Guix is free software; you can redistribute it and/or modify it
37 ;;; under the terms of the GNU General Public License as published by
38 ;;; the Free Software Foundation; either version 3 of the License, or (at
39 ;;; your option) any later version.
41 ;;; GNU Guix is distributed in the hope that it will be useful, but
42 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
43 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44 ;;; GNU General Public License for more details.
46 ;;; You should have received a copy of the GNU General Public License
47 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
49 (define-module (gnu packages check)
50 #:use-module (gnu packages)
51 #:use-module (gnu packages autotools)
52 #:use-module (gnu packages base)
53 #:use-module (gnu packages bash)
54 #:use-module (gnu packages compression)
55 #:use-module (gnu packages linux)
56 #:use-module (gnu packages llvm)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages gnome)
59 #:use-module (gnu packages golang)
60 #:use-module (gnu packages gtk)
61 #:use-module (gnu packages perl)
62 #:use-module (gnu packages pkg-config)
63 #:use-module (gnu packages python)
64 #:use-module (gnu packages python-web)
65 #:use-module (gnu packages python-xyz)
66 #:use-module (gnu packages time)
67 #:use-module (guix utils)
68 #:use-module ((guix licenses) #:prefix license:)
69 #:use-module (guix packages)
70 #:use-module (guix download)
71 #:use-module (guix git-download)
72 #:use-module (guix build-system cmake)
73 #:use-module (guix build-system gnu)
74 #:use-module (guix build-system go)
75 #:use-module (guix build-system python)
76 #:use-module (guix build-system trivial))
85 (uri (string-append "https://github.com/libcheck/check/releases/download/"
86 version "/check-" version ".tar.gz"))
89 "0d22h8xshmbpl9hba9ch3xj8vb9ybm5akpsbbh7yj07fic4h2hj6"))))
90 (build-system gnu-build-system)
91 (home-page "https://libcheck.github.io/check/")
92 (synopsis "Unit test framework for C")
94 "Check is a unit testing framework for C. It features a simple
95 interface for defining unit tests, putting little in the way of the
96 developer. Tests are run in a separate address space, so Check can
97 catch both assertion failures and code errors that cause segmentation
98 faults or other signals. The output from unit tests can be used within
99 source code editors and IDEs.")
100 (license license:lgpl2.1+)))
109 (uri (string-append "mirror://sourceforge/cunit/CUnit/"
110 version "/CUnit-" version ".tar.bz2"))
113 "057j82da9vv4li4z5ri3227ybd18nzyq81f6gsvhifs5z0vr3cpm"))))
114 (build-system gnu-build-system)
115 (arguments '(#:phases
116 (modify-phases %standard-phases
117 ;; XXX: The "bootstrap" phase detects the "bootstrap"
118 ;; script, but fails to execute it, so we bootstrap
121 (lambda _ (invoke "autoreconf" "-vfi"))))))
123 `(("automake" ,automake)
124 ("autoconf" ,autoconf)
125 ("libtool" ,libtool)))
126 (home-page "http://cunit.sourceforge.net/")
127 (synopsis "Automated testing framework for C")
129 "CUnit is a lightweight system for writing, administering, and running
130 unit tests in C. It provides C programmers with basic testing functionality
131 with a flexible variety of user interfaces.")
132 (license license:gpl2+)))
134 (define-public cppunit
140 (uri (string-append "http://dev-www.libreoffice.org/src/"
141 name "-" version ".tar.gz"))
144 "1027cyfx5gsjkdkaf6c2wnjh68882grw8n672018cj3vs9lrhmix"))))
145 ;; Explicitly link with libdl. This is expected to be done by packages
146 ;; relying on cppunit for their tests. However, not all of them do.
147 ;; If we added the linker flag to such packages, we would pollute all
148 ;; binaries, not only those used for testing.
150 `(#:make-flags '("LDFLAGS=-ldl")))
151 (build-system gnu-build-system)
152 (home-page "https://wiki.freedesktop.org/www/Software/cppunit/")
153 (synopsis "Unit testing framework for C++")
154 (description "CppUnit is the C++ port of the famous JUnit framework for
155 unit testing. Test output is in XML for automatic testing and GUI based for
157 (license license:lgpl2.1))) ; no copyright notices. LGPL2.1 is in the tarball
159 ;; When dependent packages upgraded to use newer version of catch, this one should
161 (define-public catch-framework
164 (version "1.3.5") ;Sub-minor is the build number
168 (url "https://github.com/philsquared/Catch")
170 (commit "ae5ee2cf63d6d67bd1369b512d2a7b60b571c907")))
171 (file-name (string-append name "-" version))
174 "1yfb3lxv929szqy1nw9xw3d45wzkppziqshkjxvrb1fdmf46x564"))))
175 (build-system trivial-build-system)
177 `(#:modules ((guix build utils))
179 (use-modules (guix build utils))
180 (let* ((source (assoc-ref %build-inputs "source"))
181 (output (assoc-ref %outputs "out"))
182 (incdir (string-append output "/include"))
183 (docdir (string-append output "/share/doc/catch-"
185 (for-each mkdir-p (list incdir docdir))
186 (install-file (string-append source
187 "/single_include/catch.hpp")
189 (copy-recursively (string-append source "/docs")
192 (home-page "http://catch-lib.net/")
193 (synopsis "Automated test framework for C++ and Objective-C")
195 "Catch stands for C++ Automated Test Cases in Headers and is a
196 multi-paradigm automated test framework for C++ and Objective-C.")
197 (license license:boost1.0)))
199 (define-public catch-framework2
203 (home-page "https://github.com/catchorg/Catch2")
207 (url "https://github.com/catchorg/Catch2")
208 (commit (string-append "v" version))))
209 (file-name (git-file-name name version))
212 "1gdp5wm8khn02g2miz381llw3191k7309qj8s3jd6sasj01rhf23"))))
213 (build-system cmake-build-system)
214 (synopsis "Automated test framework for C++ and Objective-C")
215 (description "Catch2 stands for C++ Automated Test Cases in Headers and is
216 a multi-paradigm automated test framework for C++ and Objective-C.")
217 (license license:boost1.0)))
219 (define-public cmdtest
225 (uri (string-append "http://git.liw.fi/cmdtest/snapshot/"
226 name "-" version ".tar.gz"))
229 "1jmfiyrrqmpvwdb273bkb8hjaf4rwx9njblx29pmr7giyahskwi5"))))
230 (build-system python-build-system)
234 (modify-phases %standard-phases
235 ;; check phase needs to be run before the build phase. If not, the
236 ;; coverage test runner looks for tests for the built source files,
239 (add-before 'build 'check
242 (("/bin/sh") (which "sh")))
243 ;; yarn uses python2-ttystatus to print messages.
244 ;; python2-ttystatus requires /dev/tty which is not present in
245 ;; the build environment. Hence assuming-failure test fails.
246 (delete-file "yarn.tests/assuming-failure.script")
247 (delete-file "yarn.tests/assuming-failure.stdout")
248 (invoke "python" "setup.py" "check"))))))
250 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)))
252 `(("python2-cliapp" ,python2-cliapp)
253 ("python2-markdown" ,python2-markdown)
254 ("python2-ttystatus" ,python2-ttystatus)))
255 (home-page "https://liw.fi/cmdtest/")
256 (synopsis "Black box Unix program tester")
258 "@code{cmdtest} black box tests Unix command line tools. Roughly, it is
259 given a command line and input files, and the expected output, and it verifies
260 that the command line produces the expected output. If not, it reports a
261 problem, and shows the differences.")
262 (license license:gpl3+)))
264 (define-public cmocka
270 (uri (string-append "https://cmocka.org/files/"
271 (version-major+minor version) "/cmocka-"
275 "1bxzzafjlwzgldcb07hjnlnqvh88wh21r2kw7z8f704w5bvvrsj3"))))
276 (build-system cmake-build-system)
278 `(#:tests? #f)) ; no test target
279 (home-page "https://cmocka.org/")
280 (synopsis "Unit testing framework for C")
281 (description "Cmocka is a unit testing framework for C with support for
282 mock objects. It only requires the standard C library, and works with
283 different compilers. Cmocka supports several different message output formats
284 like Test Anything Protocol, Subunit, xUnit XML or the original cmockery output
286 (license license:asl2.0)))
288 (define-public cppcheck
295 (url "https://github.com/danmar/cppcheck")
297 (file-name (git-file-name name version))
299 (base32 "1xiy54rz99nzbpwj35jiyssd2nc6k5k0lw5ml6nh2qnmbfkl8swl"))))
300 (build-system cmake-build-system)
302 '(#:configure-flags '("-DBUILD_TESTS=ON")))
303 (home-page "http://cppcheck.sourceforge.net")
304 (synopsis "Static C/C++ code analyzer")
305 (description "Cppcheck is a static code analyzer for C and C++. Unlike
306 C/C++ compilers and many other analysis tools it does not detect syntax errors
307 in the code. Cppcheck primarily detects the types of bugs that the compilers
308 normally do not detect. The goal is to detect only real errors in the code
309 (i.e. have zero false positives).")
310 (license license:gpl3+)))
312 (define-public cxxtest
318 (uri (string-append "mirror://sourceforge/cxxtest/cxxtest/"
319 version "/cxxtest-" version ".tar.gz"))
322 "1n7pbj4z9ivx005hqvivj9ddhq8awynzg6jishfbypf6j7ply58w"))))
323 (build-system python-build-system)
326 (modify-phases %standard-phases
327 (add-after 'unpack 'chdir-to-source
331 (add-after 'install 'install-headers
332 (lambda* (#:key outputs #:allow-other-keys)
333 (let* ((out (assoc-ref outputs "out"))
334 (include-dir (string-append out "/include/cxxtest")))
335 (for-each (lambda (header-file)
336 (install-file header-file include-dir))
337 (find-files "../cxxtest"))
339 (add-after 'install 'install-doc
340 (lambda* (#:key outputs #:allow-other-keys)
341 (let* ((out (assoc-ref outputs "out"))
342 (doc-dir (string-append out "/share/doc/cxxtest")))
343 (install-file "../README" doc-dir)
344 (install-file "../doc/guide.txt" doc-dir)
345 (copy-recursively "../sample" (string-append doc-dir "/sample"))
348 `(("python-ply" ,python-ply)))
349 (home-page "https://cxxtest.com/")
350 (synopsis "Unit testing framework for C++")
351 (description "CxxTest is a unit testing framework for C++ that is similar
352 in spirit to JUnit, CppUnit, and xUnit. CxxTest does not require precompiling
353 a CxxTest testing library, it employs no advanced features of C++ (e.g. RTTI)
354 and it supports a very flexible form of test discovery.")
355 (license license:lgpl3+)))
357 (define-public go-gopkg.in-check.v1
358 (let ((commit "788fd78401277ebd861206a03c884797c6ec5541")
361 (name "go-gopkg.in-check.v1")
362 (version (git-version "0.0.0" revision commit))
366 (url "https://github.com/go-check/check.git")
368 (file-name (git-file-name name version))
371 "0v3bim0j375z81zrpr5qv42knqs0y2qv2vkjiqi5axvb78slki1a"))))
372 (build-system go-build-system)
374 '(#:import-path "gopkg.in/check.v1"))
376 `(("go-github-com-kr-pretty" ,go-github-com-kr-pretty)))
377 (synopsis "Rich testing extension for Go's testing package")
379 "@code{check} is a rich testing extension for Go's testing package.")
380 (home-page "https://github.com/go-check/check")
381 (license license:bsd-2))))
383 (define-public go-github.com-smartystreets-gunit
385 (name "go-github.com-smartystreets-gunit")
390 (url "https://github.com/smartystreets/gunit")
392 (file-name (git-file-name name version))
395 "00m4zg0kdj49mnpmf9klb44ba71p966xsk6zknrzqgfc8119f35z"))))
396 (build-system go-build-system)
398 '(;; TODO: This package depends on go-github.com-smartystreets-assertions
399 ;; for running the tests, but go-github.com-smartystreets-assertions
400 ;; depends on this package, so break this loop by not running the tests
403 #:import-path "github.com/smartystreets/gunit"))
404 (synopsis "Testing tool for Go, in the style of xUnit")
406 "@code{gunit} allows the test author to use a struct as the scope for a
407 group of related test cases, in the style of xUnit fixtures. This makes
408 extraction of setup/teardown behavior (as well as invoking the system under
409 test) much simpler.")
410 (home-page "https://github.com/smartystreets/gunit")
411 (license license:expat)))
413 (define-public go-github.com-smartystreets-assertions
415 (name "go-github.com-smartystreets-assertions")
420 (url "https://github.com/smartystreets/assertions")
422 (file-name (git-file-name name version))
425 "1j0adgbykl55rf2945g0n5bmqdsnjcqlx5dcmpfh4chki43hiwg9"))))
426 (build-system go-build-system)
428 '(#:import-path "github.com/smartystreets/assertions"))
430 `(("go-github.com-smartystreets-gunit" ,go-github.com-smartystreets-gunit)))
431 (synopsis "Assertions for testing with Go")
433 "The @code{assertions} package provides convenient assertion functions
434 for writing tests in Go.")
435 (home-page "https://github.com/smartystreets/assertions")
436 (license license:expat)))
438 (define-public go-github.com-smartystreets-goconvey
440 (name "go-github.com-smartystreets-goconvey")
445 (url "https://github.com/smartystreets/goconvey")
447 (file-name (git-file-name name version))
450 "1ph18rkl3ns3fgin5i4j54w5a69grrmf3apcsmnpdn1wlrbs3dxh"))))
451 (build-system go-build-system)
453 '(#:import-path "github.com/smartystreets/goconvey"))
455 `(("go-github.com-jtolds-gls" ,go-github.com-jtolds-gls)
456 ("go-github.com-smartystreets-assertions" ,go-github.com-smartystreets-assertions)))
457 (synopsis "Go testing tool with both a web and terminal user interface")
459 "GoConvey is a testing tool for Go. It integrates with go test, can show
460 test coverage and has a web user interface that will refresh automatically.")
461 (home-page "https://github.com/smartystreets/goconvey")
462 (license license:expat)))
464 (define-public googletest
472 (url "https://github.com/google/googletest.git")
473 (commit (string-append "release-" version))))
474 (file-name (git-file-name name version))
476 (base32 "0270msj6n7mggh4xqqjp54kswbl7mkcc8px1p5dqdpmw5ngh9fzk"))))
477 (build-system cmake-build-system)
479 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
481 `(("python-2" ,python-2)))
482 (home-page "https://github.com/google/googletest/")
483 (synopsis "Test discovery and XUnit test framework")
484 (description "Google Test features an XUnit test framework, automated test
485 discovery, death tests, assertions, parameterized tests and XML test report
487 (license license:bsd-3)))
489 (define-public cpputest
496 (uri (string-append "https://github.com/cpputest/cpputest/releases/download/v"
497 version "/cpputest-" version ".tar.gz"))
500 "0mk48xd3klyqi7wf3f4wn4zqxxzmvrhhl32r25jzrixzl72wq7f8"))))
501 (build-system gnu-build-system)
503 `(("googletest" ,googletest)))
504 (home-page "https://cpputest.github.io/")
505 (synopsis "Unit testing and mocking framework for C/C++")
507 "CppUTest is a C/C++ based unit xUnit test framework. It is written in
508 C++ but is used in C and C++ projects and frequently used in embedded systems
509 but it works for any C/C++ project.")
510 (license license:bsd-3)))
512 (define-public python-parameterized
514 (name "python-parameterized")
519 (uri (pypi-uri "parameterized" version))
522 "1qj1939shm48d9ql6fm1nrdy4p7sdyj8clz1szh5swwpf1qqxxfa"))))
523 (build-system python-build-system)
524 (arguments '(#:tests? #f)) ; there are no tests
525 (home-page "https://github.com/wolever/parameterized")
526 (synopsis "Parameterized testing with any Python test framework")
528 "Parameterized is a Python library that aims to fix parameterized testing
529 for every Python test framework. It supports nose, py.test, and unittest.")
530 (license license:bsd-2)))
532 (define-public python2-parameterized
533 (package-with-python2 python-parameterized))
535 (define-public python-minimock
537 (name "python-minimock")
542 (uri (pypi-uri "MiniMock" version))
545 "0k2sxb1ibnyg05iblz7zhbv825f1zk9906rab7883iqgvzmdzpsz"))))
546 (build-system python-build-system)
547 (home-page "https://pypi.org/project/MiniMock")
548 (synopsis "Simple Python library for using mock objects")
549 (description "MiniMock is a simple library for building mock objects with
551 (license license:expat)))
553 (define-public python2-minimock
554 (package-with-python2 python-minimock))
556 (define-public python-mock
563 (uri (pypi-uri "mock" version))
566 "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
568 `(("python-pbr" ,python-pbr-minimal)
569 ("python-six" ,python-six)))
570 (build-system python-build-system)
572 `(("python-unittest2" ,python-unittest2)))
575 (modify-phases %standard-phases
578 (zero? (system* "unit2")))))))
579 (home-page "https://github.com/testing-cabal/mock")
580 (synopsis "Python mocking and patching library for testing")
582 "Mock is a library for testing in Python. It allows you to replace parts
583 of your system under test with mock objects and make assertions about how they
585 (properties `((python2-variant . ,(delay python2-mock))))
586 (license license:expat)))
588 (define-public python2-mock
589 (let ((base (package-with-python2
590 (strip-python2-variant python-mock))))
591 (package (inherit base)
593 `(("python2-functools32" ,python2-functools32)
594 ("python2-funcsigs" ,python2-funcsigs)
595 ,@(package-propagated-inputs base))))))
597 (define-public python-nose
604 (uri (pypi-uri "nose" version))
607 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
608 (build-system python-build-system)
610 '(#:tests? #f)) ; FIXME: test suite fails
611 (home-page "http://readthedocs.org/docs/nose/")
612 (synopsis "Python testing library")
614 "Nose extends the unittest library to make testing easier.")
615 (license license:lgpl2.0+)))
617 (define-public python2-nose
618 (package-with-python2 python-nose))
620 (define-public python-nose2
622 (name "python-nose2")
627 (uri (pypi-uri "nose2" version))
630 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
631 (build-system python-build-system)
632 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
634 `(("python-cov-core" ,python-cov-core)
635 ("python-pytest-cov" ,python-pytest-cov)
636 ("python-six" ,python-six)))
637 (home-page "https://github.com/nose-devs/nose2")
638 (synopsis "Next generation of nicer testing for Python")
640 "Nose2 is the next generation of nicer testing for Python, based on the
641 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
642 better plugin api, being easier for users to configure, and simplifying internal
643 interfaces and processes.")
644 (license license:bsd-2)))
646 (define-public python2-nose2
647 (package-with-python2 python-nose2))
649 (define-public python-unittest2
651 (name "python-unittest2")
656 (uri (pypi-uri "unittest2" version))
658 (search-patches "python-unittest2-python3-compat.patch"
659 "python-unittest2-remove-argparse.patch"))
662 "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212"))))
663 (build-system python-build-system)
666 (modify-phases %standard-phases
669 (zero? (system* "python" "-m" "unittest2" "discover" "--verbose")))))))
671 `(("python-six" ,python-six)
672 ("python-traceback2" ,python-traceback2)))
673 (home-page "http://pypi.python.org/pypi/unittest2")
674 (synopsis "Python unit testing library")
676 "Unittest2 is a replacement for the unittest module in the Python
678 (license license:psfl)))
680 (define-public python2-unittest2
681 (package-with-python2 python-unittest2))
683 (define-public python-pytest
685 (name "python-pytest")
690 (uri (pypi-uri "pytest" version))
693 "18w38kjnffdcrlbw6ny6dksgxai6x9bxpjs2m6klqmb8hfzjkcb2"))))
694 (build-system python-build-system)
697 (modify-phases %standard-phases
700 (invoke "pytest" "-vv" "-k"
702 ;; These tests involve the /usr directory, and fails.
703 "not test_remove_dir_prefix"
704 " and not test_argcomplete"
705 ;; This test tries to override PYTHONPATH, and
706 ;; subsequently fails to locate the test libraries.
707 " and not test_collection")))))))
709 `(("python-atomicwrites" ,python-atomicwrites)
710 ("python-attrs" ,python-attrs-bootstrap)
711 ("python-more-itertools" ,python-more-itertools)
712 ("python-pluggy" ,python-pluggy)
713 ("python-py" ,python-py)
714 ("python-six" ,python-six-bootstrap)))
716 `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
718 ("python-hypothesis" ,python-hypothesis)
719 ("python-nose" ,python-nose)
720 ("python-mock" ,python-mock)
721 ("python-pytest" ,python-pytest-bootstrap)
722 ("python-setuptools-scm" ,python-setuptools-scm)))
723 (home-page "https://docs.pytest.org/en/latest/")
724 (synopsis "Python testing library")
726 "Pytest is a testing tool that provides auto-discovery of test modules
727 and functions, detailed info on failing assert statements, modular fixtures,
728 and many external plugins.")
729 (license license:expat)
730 (properties `((python2-variant . ,(delay python2-pytest))))))
732 (define-public python2-pytest
733 (let ((pytest (package-with-python2
734 (strip-python2-variant python-pytest))))
738 `(("python2-funcsigs" ,python2-funcsigs)
739 ("python2-pathlib2" ,python2-pathlib2)
740 ,@(package-propagated-inputs pytest))))))
742 (define-public python-pytest-bootstrap
744 (inherit (strip-python2-variant python-pytest))
745 (name "python-pytest-bootstrap")
746 (native-inputs `(("python-setuptools-scm" ,python-setuptools-scm)))
747 (arguments `(#:tests? #f))
748 (properties `((python2-variant . ,(delay python2-pytest-bootstrap))))))
750 (define-public python2-pytest-bootstrap
751 (let ((pytest (package-with-python2
752 (strip-python2-variant python-pytest-bootstrap))))
753 (package (inherit pytest)
755 `(("python2-funcsigs" ,python2-funcsigs-bootstrap)
756 ("python2-pathlib2" ,python2-pathlib2-bootstrap)
757 ,@(package-propagated-inputs pytest))))))
759 (define-public python-pytest-cov
761 (name "python-pytest-cov")
766 (uri (pypi-uri "pytest-cov" version))
768 (base32 "0cyxbbghx2l4p60w10k00j1j74q1ngfiffr0pxn73ababjr69dha"))))
769 (build-system python-build-system)
772 (modify-phases %standard-phases
775 ;; Options taken from tox.ini.
776 ;; TODO: make "--restructuredtext" tests pass. They currently fail
777 ;; with "Duplicate implicit target name".
778 (invoke "python" "./setup.py" "check"
779 "--strict" "--metadata"))))))
781 `(("python-coverage" ,python-coverage)
782 ("python-pytest" ,python-pytest)))
783 (home-page "https://github.com/pytest-dev/pytest-cov")
784 (synopsis "Pytest plugin for measuring coverage")
786 "Pytest-cov produces coverage reports. It supports centralised testing and
787 distributed testing in both @code{load} and @code{each} modes. It also
788 supports coverage of subprocesses.")
789 (license license:expat)))
791 (define-public python2-pytest-cov
792 (package-with-python2 python-pytest-cov))
794 (define-public python-pytest-runner
796 (name "python-pytest-runner")
801 (uri (pypi-uri "pytest-runner" version))
804 "1x0d9n40lsiphblbs61rdc0d5r31f6vh0vcahqdv0mffakbnrb80"))))
805 (build-system python-build-system)
807 `(("python-pytest" ,python-pytest-bootstrap)
808 ("python-setuptools-scm" ,python-setuptools-scm)))
809 (home-page "https://github.com/pytest-dev/pytest-runner")
810 (synopsis "Invoke py.test as a distutils command")
812 "This package provides a @command{pytest-runner} command that
813 @file{setup.py} files can use to run tests.")
814 (license license:expat)))
816 (define-public python2-pytest-runner
817 (package-with-python2 python-pytest-runner))
819 (define-public python-pytest-mock
821 (name "python-pytest-mock")
826 (uri (pypi-uri "pytest-mock" version))
829 "1i5mg3ff1qk0wqfcxfz60hwy3q5dskdp36i10ckigkzffg8hc3ad"))))
830 (build-system python-build-system)
832 `(("python-setuptools-scm" ,python-setuptools-scm)))
834 `(("python-pytest" ,python-pytest)))
835 (home-page "https://github.com/pytest-dev/pytest-mock/")
836 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
838 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
839 around the patching API provided by the @code{mock} package, but with the
840 benefit of not having to worry about undoing patches at the end of a test.
841 The mocker fixture has the same API as @code{mock.patch}, supporting the
843 (properties `((python2-variant . ,(delay python2-pytest-mock))))
844 (license license:expat)))
846 (define-public python2-pytest-mock
847 (let ((base (package-with-python2
848 (strip-python2-variant python-pytest-mock))))
849 (package (inherit base)
851 `(("python2-mock" ,python2-mock)
852 ,@(package-propagated-inputs base))))))
854 (define-public python-pytest-xdist
856 (name "python-pytest-xdist")
861 (uri (pypi-uri "pytest-xdist" version))
864 "1d812apvcmshh2l8f38spqwb3bpp0x43yy7lyfpxxzc99h4r7y4n"))
865 (modules '((guix build utils)))
868 ;; Remove pre-compiled .pyc files from source.
869 (for-each delete-file-recursively
870 (find-files "." "__pycache__" #:directories? #t))
871 (for-each delete-file (find-files "." "\\.pyc$"))
873 (build-system python-build-system)
875 '(#:tests? #f)) ;FIXME: Some tests are failing.
877 ;; (modify-phases %standard-phases
879 ;; (add-after 'install 'check
880 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
881 ;; (add-installed-pythonpath inputs outputs)
882 ;; (zero? (system* "py.test" "-v")))))
884 `(("python-setuptools-scm" ,python-setuptools-scm)))
886 `(("python-execnet" ,python-execnet)
887 ("python-pytest" ,python-pytest)
888 ("python-py" ,python-py)))
890 "https://github.com/pytest-dev/pytest-xdist")
892 "Plugin for py.test with distributed testing and loop-on-failing modes")
894 "The pytest-xdist plugin extends py.test with some unique test execution
895 modes: parallelization, running tests in boxed subprocesses, the ability
896 to run tests repeatedly when failed, and the ability to run tests on multiple
897 Python interpreters or platforms. It uses rsync to copy the existing
898 program code to a remote location, executes there, and then syncs the
900 (license license:expat)))
902 (define-public python2-pytest-xdist
903 (package-with-python2 python-pytest-xdist))
905 (define-public python-pytest-timeout
907 (name "python-pytest-timeout")
912 (uri (pypi-uri "pytest-timeout" version))
915 "1cczcjhw4xx5sjkhxlhc5c1bkr7x6fcyx12wrnvwfckshdvblc2a"))))
916 (build-system python-build-system)
918 `(("python-pytest" ,python-pytest)))
919 (home-page "http://bitbucket.org/pytest-dev/pytest-timeout/")
920 (synopsis "Plugin for py.test to abort hanging tests")
922 "This package provides a py.test plugin that aborts hanging tests after a
923 timeout has been exceeded.")
924 (license license:expat)))
926 (define-public python-scripttest
928 (name "python-scripttest")
933 (uri (pypi-uri "scripttest" version))
936 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
937 (build-system python-build-system)
939 `(("python-pytest" ,python-pytest)))
940 (home-page "http://pythonpaste.org/scripttest/")
941 (synopsis "Python library to test command-line scripts")
942 (description "Scripttest is a Python helper library for testing
943 interactive command-line applications. With it you can run a script in a
944 subprocess and see the output as well as any file modifications.")
945 (license license:expat)))
947 (define-public python2-scripttest
948 (package-with-python2 python-scripttest))
950 (define-public python-testtools-bootstrap
952 (name "python-testtools-bootstrap")
957 (uri (pypi-uri "testtools" version))
960 "0n8519lk8aaa91vymz842831181wf7fss98hyllhygi3z1nfq9sq"))
961 (patches (search-patches "python-testtools.patch"))))
962 (build-system python-build-system)
963 (arguments '(#:tests? #f))
965 `(("python-extras" ,python-extras)
966 ("python-fixtures" ,python-fixtures-bootstrap)
967 ("python-mimeparse" ,python-mimeparse)
968 ("python-pbr" ,python-pbr-minimal)
969 ("python-six" ,python-six)
970 ("python-traceback2" ,python-traceback2)
971 ("python-unittest2" ,python-unittest2)))
972 (home-page "https://github.com/testing-cabal/testtools")
974 "Extensions to the Python standard library unit testing framework")
976 "This package is only for bootstrapping. Do not use this.")
977 (license license:psfl)))
979 (define-public python2-testtools-bootstrap
980 (package-with-python2 python-testtools-bootstrap))
982 (define-public python-testtools
984 (inherit python-testtools-bootstrap)
985 (name "python-testtools")
987 `(#:phases (modify-phases %standard-phases
990 (invoke "python" "-m" "testtools.run"
991 "testtools.tests.test_suite"))))))
993 `(("python-extras" ,python-extras)
994 ("python-fixtures" ,python-fixtures)
995 ("python-mimeparse" ,python-mimeparse)
996 ("python-pbr" ,python-pbr)
997 ("python-six" ,python-six)
998 ("python-traceback2" ,python-traceback2)
999 ("python-unittest2" ,python-unittest2)))
1001 `(("python-testscenarios" ,python-testscenarios-bootstrap)))
1003 "Testtools extends the Python standard library unit testing framework to
1004 provide matchers, more debugging information, and cross-Python
1007 (define-public python2-testtools
1008 (package-with-python2 python-testtools))
1010 (define-public python-testscenarios-bootstrap
1012 (name "python-testscenarios-bootstrap")
1017 (uri (pypi-uri "testscenarios" version))
1020 "1dm2aydqpv76vnsk1pw7k8n42hq58cfi4n1ixy7nyzpaj1mwnmy2"))))
1021 (build-system python-build-system)
1023 `(#:phases (modify-phases %standard-phases
1026 (invoke "python" "-m" "testtools.run"
1027 "testscenarios.test_suite"))))))
1029 `(("python-pbr" ,python-pbr-minimal)
1030 ("python-testtools" ,python-testtools-bootstrap)))
1031 (home-page "https://launchpad.net/testscenarios")
1032 (synopsis "Pyunit extension for dependency injection")
1034 "This package is only for bootstrapping. Don't use this.")
1035 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1037 (define-public python2-testscenarios-bootstrap
1038 (package-with-python2 python-testscenarios-bootstrap))
1040 (define-public python-testscenarios
1042 (inherit python-testscenarios-bootstrap)
1043 (name "python-testscenarios")
1045 `(("python-pbr" ,python-pbr)
1046 ("python-testtools" ,python-testtools)))
1048 "Testscenarios provides clean dependency injection for Python unittest
1051 (define-public python2-testscenarios
1052 (package-with-python2 python-testscenarios))
1054 ;; Testresources requires python-pbr at runtime, but pbr needs it for its
1055 ;; own tests. Hence this bootstrap variant.
1056 (define-public python-testresources-bootstrap
1058 (name "python-testresources-bootstrap")
1062 (uri (pypi-uri "testresources" version))
1065 "05s4dsli9g17m1r3b1gvwicbbgq011hnpb2b9qnj27ja2n11k7gf"))))
1066 (build-system python-build-system)
1067 (arguments '(#:tests? #f))
1069 `(("python-pbr" ,python-pbr-minimal)))
1070 (home-page "https://launchpad.net/testresources")
1072 "Pyunit extension for managing test resources")
1074 "This package is only here for bootstrapping purposes. Use the regular
1075 testresources package instead.")
1076 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1078 (define-public python2-testresources-bootstrap
1079 (package-with-python2 python-testresources-bootstrap))
1081 (define-public python-testresources
1083 (inherit python-testresources-bootstrap)
1084 (name "python-testresources")
1086 `(("python-pbr" ,python-pbr)))
1089 `(("python-fixtures" ,python-fixtures)
1090 ("python-testtols" ,python-testtools)))
1092 "Testresources is an extension to Python's unittest to allow declarative
1093 use of resources by test cases.")))
1095 (define-public python2-testresources
1096 (package-with-python2 python-testresources))
1098 (define-public python-subunit-bootstrap
1100 (name "python-subunit-bootstrap")
1105 (uri (pypi-uri "python-subunit" version))
1108 "1fsw8rsn1s3nklx06mayrg5rn2zbky6wwjc5z07s7rf1wjzfs1wn"))))
1109 (build-system python-build-system)
1111 `(("python-extras" ,python-extras)
1112 ("python-testtools" ,python-testtools-bootstrap)))
1114 `(("python-fixtures" ,python-fixtures-bootstrap)
1115 ("python-hypothesis" ,python-hypothesis)
1116 ("python-testscenarios" ,python-testscenarios-bootstrap)))
1117 (home-page "https://launchpad.net/subunit")
1118 (synopsis "Python implementation of the subunit protocol")
1120 "This package is here for bootstrapping purposes only. Use the regular
1121 python-subunit package instead.")
1122 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1124 (define-public python2-subunit-bootstrap
1125 (package-with-python2 python-subunit-bootstrap))
1127 (define-public python-subunit
1129 (inherit python-subunit-bootstrap)
1130 (name "python-subunit")
1132 `(("python-extras" ,python-extras)
1133 ("python-testtools" ,python-testtools)))
1135 `(("python-fixtures" ,python-fixtures)
1136 ("python-hypothesis" ,python-hypothesis)
1137 ("python-testscenarios" ,python-testscenarios)))
1139 "Python-subunit is a Python implementation of the subunit test streaming
1142 (define-public python2-subunit
1143 (package-with-python2 python-subunit))
1145 ;; Fixtures requires python-pbr at runtime, but pbr uses fixtures for its
1146 ;; own tests. Hence this bootstrap variant.
1147 (define-public python-fixtures-bootstrap
1149 (name "python-fixtures-bootstrap")
1153 (uri (pypi-uri "fixtures" version))
1156 "1vxj29bzz3rd4pcy51d05wng9q9dh4jq6wx92yklsm7i6h1ddw7w"))))
1157 (build-system python-build-system)
1158 (arguments `(#:tests? #f))
1160 `(("python-pbr-minimal" ,python-pbr-minimal)
1161 ("python-six" ,python-six)))
1162 (home-page "https://launchpad.net/python-fixtures")
1163 (synopsis "Python test fixture library")
1165 "This package is only used for bootstrapping. Use the regular
1166 python-fixtures package instead.")
1167 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
1169 (define-public python2-fixtures-bootstrap
1170 (package-with-python2 python-fixtures-bootstrap))
1172 (define-public python-fixtures
1174 (inherit python-fixtures-bootstrap)
1175 (name "python-fixtures")
1178 (modify-phases %standard-phases
1181 (invoke "python" "-m" "testtools.run"
1182 "fixtures.test_suite"))))))
1184 ;; Fixtures uses pbr at runtime to check versions, etc.
1185 `(("python-pbr" ,python-pbr)
1186 ("python-six" ,python-six)))
1188 `(("python-mock" ,python-mock)
1189 ("python-testtools" ,python-testtools-bootstrap)))
1191 "Fixtures provides a way to create reusable state, useful when writing
1194 (define-public python2-fixtures
1195 (package-with-python2 python-fixtures))
1197 (define-public python-testrepository-bootstrap
1199 (name "python-testrepository-bootstrap")
1204 (uri (pypi-uri "testrepository" version))
1207 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
1208 (build-system python-build-system)
1209 (arguments '(#:tests? #f))
1211 `(("python-fixtures" ,python-fixtures-bootstrap)
1212 ("python-subunit" ,python-subunit-bootstrap)
1213 ("python-testtools" ,python-testtools-bootstrap)))
1215 `(("python-mimeparse" ,python-mimeparse)))
1216 (home-page "https://launchpad.net/testrepository")
1217 (synopsis "Database for Python test results")
1219 "Bootstrap package for python-testrepository. Don't use this.")
1220 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
1222 (define-public python2-testrepository-bootstrap
1223 (package-with-python2 python-testrepository-bootstrap))
1225 (define-public python-testrepository
1227 (inherit python-testrepository-bootstrap)
1228 (name "python-testrepository")
1230 ;; FIXME: Many tests are failing.
1233 `(("python-fixtures" ,python-fixtures)
1234 ("python-subunit" ,python-subunit)
1235 ("python-testtools" ,python-testtools)))
1237 `(("python-mimeparse" ,python-mimeparse)))
1238 (description "Testrepository provides a database of test results which can
1239 be used as part of a developer's workflow to check things such as what tests
1240 have failed since the last commit or what tests are currently failing.")))
1242 (define-public python2-testrepository
1243 (package-with-python2 python-testrepository))
1245 (define-public python-coverage
1247 (name "python-coverage")
1252 (uri (pypi-uri "coverage" version))
1255 "02f6m073qdispn96rc616hg0rnmw1pgqzw3bgxwiwza4zf9hirlx"))))
1256 (build-system python-build-system)
1258 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
1260 (home-page "http://nedbatchelder.com/code/coverage")
1261 (synopsis "Code coverage measurement for Python")
1263 "Coverage measures code coverage, typically during test execution. It
1264 uses the code analysis tools and tracing hooks provided in the Python standard
1265 library to determine which lines are executable, and which have been
1267 (license license:bsd-3)))
1269 (define-public python2-coverage
1270 (package-with-python2 python-coverage))
1272 (define-public python-cov-core
1274 (name "python-cov-core")
1279 (uri (pypi-uri "cov-core" version))
1282 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
1283 (build-system python-build-system)
1285 `(("python-coverage" ,python-coverage)))
1286 (home-page "https://github.com/schlamar/cov-core")
1287 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
1289 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
1290 and @code{nose2-cov}. It is useful for developing coverage plugins for these
1291 testing frameworks.")
1292 (license license:expat)))
1294 (define-public python2-cov-core
1295 (package-with-python2 python-cov-core))
1297 (define-public python-codecov
1299 (name "python-codecov")
1304 (uri (pypi-uri "codecov" version))
1307 "1217c0vqf7ii65635gvl27a5pfhv0r7zhrpdp9cx640hg73bgn4f"))))
1308 (build-system python-build-system)
1310 `(("python-unittest2" ,python-unittest2)))
1312 `(("python-coverage" ,python-coverage)
1313 ("python-requests" ,python-requests)))
1314 (home-page "http://github.com/codecov/codecov-python")
1315 (synopsis "Upload code coverage reports to @code{codecov.io}")
1317 "Codecov collects code coverage reports from code written in Python, Java,
1318 C/C++, R, and more, and uploads it to the @code{codecov.io} service.")
1319 (license license:asl2.0)))
1321 (define-public python-testpath
1323 (name "python-testpath")
1329 (url "https://github.com/jupyter/testpath")
1331 (file-name (git-file-name name version))
1334 "0r4iiizjql6ny1ln7ciw7rrbjadz1s9zrf2hl0xkgnh3ypd8936f"))))
1335 (build-system python-build-system)
1337 `(#:tests? #f ; this package does not even have a setup.py
1338 #:modules ((guix build python-build-system)
1341 #:imported-modules (,@%python-build-system-modules
1344 (modify-phases %standard-phases
1347 (lambda* (#:key inputs outputs #:allow-other-keys)
1348 (let* ((version (last
1349 (string-split (assoc-ref inputs "python") #\-)))
1350 (x.y (string-join (take (string-split version #\.) 2)
1353 (assoc-ref outputs "out")
1354 "/lib/python" x.y "/site-packages/testpath")))
1356 (copy-recursively "testpath" dir))
1358 (home-page "https://github.com/takluyver/testpath")
1359 (synopsis "Test utilities for code working with files and commands")
1361 "Testpath is a collection of utilities for Python code working with files
1362 and commands. It contains functions to check things on the file system, and
1363 tools for mocking system commands and recording calls to those.")
1364 (license license:expat)))
1366 (define-public python2-testpath
1367 (package-with-python2 python-testpath))
1369 (define-public python-testlib
1371 (name "python-testlib")
1376 (uri (pypi-uri "testlib" version ".zip"))
1378 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
1379 (build-system python-build-system)
1381 `(("unzip" ,unzip))) ; for unpacking the source
1382 (synopsis "Python micro test suite harness")
1383 (description "A micro unittest suite harness for Python.")
1384 (home-page "https://github.com/trentm/testlib")
1385 (license license:expat)))
1387 (define-public python2-testlib
1388 (package-with-python2 python-testlib))
1390 ;;; The software provided by this package was integrated into pytest 2.8.
1391 (define-public python-pytest-cache
1393 (name "python-pytest-cache")
1397 (uri (pypi-uri "pytest-cache" version))
1400 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
1401 (build-system python-build-system)
1403 `(("python-apipkg" ,python-apipkg)
1404 ("python-execnet" ,python-execnet)
1405 ("python-py" ,python-py)
1406 ("python-pytest" ,python-pytest)))
1407 (synopsis "Py.test plugin with mechanisms for caching across test runs")
1408 (description "The pytest-cache plugin provides tools to rerun failures from
1409 the last py.test invocation.")
1410 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
1411 (license license:expat)))
1413 (define-public python2-pytest-cache
1414 (package-with-python2 python-pytest-cache))
1416 (define-public python-pytest-localserver
1418 (name "python-pytest-localserver")
1422 (uri (pypi-uri "pytest-localserver" version))
1425 "1hpgpxrpfq5c731ndnsay2lc0y9nh2wy9fn1f83s3z8xkn82fm1s"))))
1426 (build-system python-build-system)
1429 (modify-phases %standard-phases
1432 (invoke "py.test" "-v"))))))
1434 `(("python-pytest" ,python-pytest)
1435 ("python-requests" ,python-requests)
1436 ("python-six" ,python-six)))
1438 `(("python-werkzeug" ,python-werkzeug)))
1439 (synopsis "Py.test plugin to test server connections locally")
1440 (description "Pytest-localserver is a plugin for the pytest testing
1441 framework which enables you to test server connections locally.")
1442 (home-page "https://pypi.python.org/pypi/pytest-localserver")
1443 (license license:expat)))
1445 (define-public python-pytest-xprocess
1447 (name "python-pytest-xprocess")
1451 (uri (pypi-uri "pytest-xprocess" version))
1454 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
1455 (build-system python-build-system)
1457 `(("python-pytest" ,python-pytest)
1458 ("python-pytest-cache" ,python-pytest-cache)
1459 ("python-psutil" ,python-psutil)))
1460 (synopsis "Pytest plugin to manage external processes across test runs")
1461 (description "Pytest-xprocess is an experimental py.test plugin for managing
1462 processes across test runs.")
1463 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
1464 (license license:expat)))
1466 (define-public python-pytest-subtesthack
1468 (name "python-pytest-subtesthack")
1472 (uri (pypi-uri "pytest-subtesthack" version))
1475 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
1476 (build-system python-build-system)
1478 `(("python-pytest" ,python-pytest)))
1479 (synopsis "Set-up and tear-down fixtures for unit tests")
1480 (description "This plugin allows you to set up and tear down fixtures within
1481 unit test functions that use @code{py.test}. This is useful for using
1482 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
1483 function multiple times, without setting up or tearing down fixture state as is
1484 normally the case.")
1485 (home-page "https://github.com/untitaker/pytest-subtesthack/")
1486 (license license:unlicense)))
1488 (define-public python2-pytest-subtesthack
1489 (package-with-python2 python-pytest-subtesthack))
1491 (define-public python-pytest-sugar
1493 (name "python-pytest-sugar")
1498 (uri (pypi-uri "pytest-sugar" version))
1501 "1asq7yc4g8bx2sn7yy974mhc9ywvaihasjab4inkirdwn9s7mn7w"))))
1502 (build-system python-build-system)
1504 `(("python-packaging" ,python-packaging)
1505 ("python-pytest" ,python-pytest)
1506 ("python-termcolor" ,python-termcolor)))
1507 (home-page "https://pivotfinland.com/pytest-sugar/")
1508 (synopsis "Plugin for pytest that changes the default look and feel")
1510 "@code{pytest-sugar} is a plugin for py.test that changes the default
1511 look and feel of py.test, using a progress bar and showing failures and errors
1513 (license license:bsd-3)))
1515 (define-public python-hypothesis
1517 (name "python-hypothesis")
1521 (uri (pypi-uri "hypothesis" version))
1524 "0a35nwqyjnm4cphi43xracqpkws0ip61mndvqb1iqq7gkva83lb1"))))
1525 (build-system python-build-system)
1527 `(("python-flake8" ,python-flake8)
1528 ("python-pytest" ,python-pytest-bootstrap)))
1530 `(("python-attrs" ,python-attrs-bootstrap)
1531 ("python-coverage" ,python-coverage)))
1532 (synopsis "Library for property based testing")
1533 (description "Hypothesis is a library for testing your Python code against a
1534 much larger range of examples than you would ever want to write by hand. It’s
1535 based on the Haskell library, Quickcheck, and is designed to integrate
1536 seamlessly into your existing Python unit testing work flow.")
1537 (home-page "https://github.com/HypothesisWorks/hypothesis-python")
1538 (license license:mpl2.0)
1539 (properties `((python2-variant . ,(delay python2-hypothesis))))))
1541 (define-public python2-hypothesis
1542 (let ((hypothesis (package-with-python2
1543 (strip-python2-variant python-hypothesis))))
1544 (package (inherit hypothesis)
1546 `(("python2-enum34" ,python2-enum34)
1547 ,@(package-propagated-inputs hypothesis))))))
1549 (define-public python-lit
1556 (uri (pypi-uri "lit" version))
1559 "0z651m3vkbk85y41larnsjxrszkbi58x9gzml3lb6ga7qwcrsg97"))))
1560 (build-system python-build-system)
1563 (modify-phases %standard-phases
1566 (invoke "python" "lit.py" "tests"))))))
1569 (home-page "https://llvm.org/")
1570 (synopsis "LLVM Software Testing Tool")
1571 (description "@code{lit} is a portable tool for executing LLVM and Clang
1572 style test suites, summarizing their results, and providing indication of
1574 (license license:ncsa)))
1576 (define-public python2-lit
1577 (package-with-python2 python-lit))
1579 (define-public python-pytest-pep8
1581 (name "python-pytest-pep8")
1585 (uri (pypi-uri "pytest-pep8" version))
1588 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
1589 (build-system python-build-system)
1591 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
1593 `(("python-pytest" ,python-pytest)))
1595 `(("python-pep8" ,python-pep8)))
1596 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
1597 (synopsis "Py.test plugin to check PEP8 requirements")
1598 (description "Pytest plugin for checking PEP8 compliance.")
1599 (license license:expat)))
1601 (define-public python2-pytest-pep8
1602 (package-with-python2 python-pytest-pep8))
1604 (define-public python-pytest-flakes
1606 (name "python-pytest-flakes")
1610 (uri (pypi-uri "pytest-flakes" version))
1613 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
1614 (build-system python-build-system)
1617 (modify-phases %standard-phases
1619 (add-after 'install 'check
1620 (lambda* (#:key outputs inputs #:allow-other-keys)
1621 ;; It's easier to run tests after install.
1622 ;; Make installed package available for running the tests
1623 (add-installed-pythonpath inputs outputs)
1624 (invoke "py.test" "-vv"))))))
1626 `(("python-coverage" ,python-coverage)
1627 ("python-pytest" ,python-pytest)
1628 ("python-pytest-cache" ,python-pytest-cache)
1629 ("python-pytest-pep8" ,python-pytest-pep8)))
1631 `(("python-pyflakes" ,python-pyflakes)))
1632 (home-page "https://github.com/fschulze/pytest-flakes")
1633 (synopsis "Py.test plugin to check source code with pyflakes")
1634 (description "Pytest plugin for checking Python source code with pyflakes.")
1635 (license license:expat)))
1637 (define-public python2-pytest-flakes
1638 (package-with-python2 python-pytest-flakes))
1640 (define-public python2-coverage-test-runner
1642 (name "python2-coverage-test-runner")
1648 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
1649 "coverage-test-runner/snapshot/coverage-test-runner-"
1653 "1kjjb9llckycnfxag8zcvqsn4z1s3dwyw6b1n0avxydihgf30rny"))))
1654 (build-system python-build-system)
1656 `(#:python ,python-2
1658 (modify-phases %standard-phases
1661 (invoke "./testrun"))))))
1663 `(("python2-coverage" ,python2-coverage)))
1664 (home-page "https://liw.fi/coverage-test-runner/")
1665 (synopsis "Python module for running unit tests")
1666 (description "@code{CoverageTestRunner} is a python module for running
1667 unit tests and failing them if the unit test module does not exercise all
1668 statements in the module it tests.")
1669 (license license:gpl3+)))
1671 (define-public python-pylint
1673 (name "python-pylint")
1679 "https://github.com/PyCQA/pylint/archive/pylint-"
1683 "0mzn1czhf1mgr2wiqfihb274sja02h899b85kywdpivppa9nwrmp"))))
1684 (build-system python-build-system)
1686 `(("python-pytest" ,python-pytest)
1687 ("python-pytest-runner" ,python-pytest-runner)
1688 ("python-tox" ,python-tox)))
1690 `(("python-astroid" ,python-astroid)
1691 ("python-isort" ,python-isort)
1692 ("python-mccabe" ,python-mccabe)
1693 ("python-six" ,python-six)))
1696 (modify-phases %standard-phases
1699 ;; Somehow, tests for python2-pylint
1700 ;; fail if run from the build directory
1701 (let ((work "/tmp/work"))
1703 (setenv "PYTHONPATH"
1704 (string-append (getenv "PYTHONPATH") ":" work))
1705 (copy-recursively "." work)
1706 (with-directory-excursion "/tmp"
1707 (invoke "python" "-m" "unittest" "discover"
1708 "-s" (string-append work "/pylint/test")
1709 "-p" "*test_*.py"))))))))
1710 (home-page "https://github.com/PyCQA/pylint")
1711 (synopsis "Python source code analyzer which looks for coding standard
1713 (description "Pylint is a Python source code analyzer which looks
1714 for programming errors, helps enforcing a coding standard and sniffs
1715 for some code smells (as defined in Martin Fowler's Refactoring book).
1717 Pylint has many rules enabled by default, way too much to silence them
1718 all on a minimally sized program. It's highly configurable and handle
1719 pragmas to control it from within your code. Additionally, it is
1720 possible to write plugins to add your own checks.")
1721 (properties `((python2-variant . ,(delay python2-pylint))))
1722 (license license:gpl2+)))
1724 (define-public python2-pylint
1725 (let ((pylint (package-with-python2
1726 (strip-python2-variant python-pylint))))
1727 (package (inherit pylint)
1729 `(("python2-backports-functools-lru-cache"
1730 ,python2-backports-functools-lru-cache)
1731 ("python2-configparser" ,python2-configparser)
1732 ,@(package-propagated-inputs pylint))))))
1734 (define-public python-paramunittest
1736 (name "python-paramunittest")
1741 (uri (pypi-uri "ParamUnittest" version))
1744 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
1745 (build-system python-build-system)
1747 "https://github.com/rik0/ParamUnittest")
1749 "Simple extension to have parametrized unit tests")
1751 "This package allows to create parametrized unit-tests that work with the standard
1752 unittest package. A parametrized test case is automatically converted to multiple test
1753 cases. Since they are TestCase subclasses, they work with other test suites that
1754 recognize TestCases.")
1755 (license license:bsd-2)))
1757 (define-public python2-python-paramunittest
1758 (package-with-python2 python-paramunittest))
1760 (define-public python-pytest-warnings
1762 (name "python-pytest-warnings")
1767 (uri (pypi-uri "pytest-warnings" version))
1770 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
1771 (build-system python-build-system)
1773 `(("pytest" ,python-pytest)))
1774 (home-page "https://github.com/fschulze/pytest-warnings")
1775 (synopsis "Pytest plugin to list Python warnings in pytest report")
1777 "Python-pytest-warnings is a pytest plugin to list Python warnings in
1779 (license license:expat)
1780 (properties `((python2-variant . ,(delay python2-pytest-warnings))
1781 ;; This package is part of pytest as of version 3.1.0.
1782 (superseded . ,python-pytest)))))
1784 (define-public python2-pytest-warnings
1785 (package (inherit (package-with-python2
1786 (strip-python2-variant python-pytest-warnings)))
1787 (properties `((superseded . ,python2-pytest)))))
1789 (define-public python-pytest-capturelog
1791 (name "python-pytest-capturelog")
1796 (uri (pypi-uri "pytest-capturelog" version ".tar.gz"))
1799 "038049nyjl7di59ycnxvc9nydivc5m8np3hqq84j2iirkccdbs5n"))))
1800 (build-system python-build-system)
1802 `(("pytest" ,python-pytest)))
1803 (home-page "https://bitbucket.org/memedough/pytest-capturelog/overview")
1804 (synopsis "Pytest plugin to catch log messages")
1806 "Python-pytest-catchlog is a pytest plugin to catch log messages.")
1807 (license license:expat)))
1809 (define-public python2-pytest-capturelog
1810 (package-with-python2 python-pytest-capturelog))
1812 (define-public python-pytest-catchlog
1814 (name "python-pytest-catchlog")
1819 (uri (pypi-uri "pytest-catchlog" version ".zip"))
1822 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
1823 (build-system python-build-system)
1825 `(("unzip" ,unzip)))
1827 `(("pytest" ,python-pytest)))
1828 (home-page "https://github.com/eisensheng/pytest-catchlog")
1829 (synopsis "Pytest plugin to catch log messages")
1831 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
1832 a fork of pytest-capturelog.")
1833 (license license:expat)))
1835 (define-public python2-pytest-catchlog
1836 (package-with-python2 python-pytest-catchlog))
1838 (define-public python-nosexcover
1840 (name "python-nosexcover")
1844 (uri (pypi-uri "nosexcover" version))
1847 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
1848 (build-system python-build-system)
1850 `(("python-coverage" ,python-coverage)
1851 ("python-nose" ,python-nose)))
1852 (home-page "http://github.com/cmheisel/nose-xcover")
1853 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
1854 (description "Nose-xcover is a companion to the built-in
1855 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
1856 to a file named coverage.xml.
1858 It will honor all the options you pass to the Nose coverage plugin,
1859 especially -cover-package.")
1860 (license license:expat)))
1862 (define-public python2-nosexcover
1863 (package-with-python2 python-nosexcover))
1865 (define-public python-discover
1867 (name "python-discover")
1872 (uri (pypi-uri "discover" version))
1875 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
1876 (build-system python-build-system)
1877 (home-page "http://pypi.python.org/pypi/discover/")
1879 "Python test discovery for unittest")
1881 "Discover provides test discovery for unittest, a feature that has been
1882 backported from Python 2.7 for Python 2.4+.")
1883 (license license:bsd-3)))
1885 (define-public python2-discover
1886 (package-with-python2 python-discover))
1888 (define-public behave
1894 (uri (pypi-uri "behave" version))
1897 "11hsz365qglvpp1m1w16239c3kiw15lw7adha49lqaakm8kj6rmr"))))
1898 (build-system python-build-system)
1900 `(("python-mock" ,python-mock)
1901 ("python-nose" ,python-nose)
1902 ("python-pathpy" ,python-pathpy)
1903 ("python-pyhamcrest" ,python-pyhamcrest)
1904 ("python-pytest" ,python-pytest)))
1906 `(("python-importlib-metadata" ,python-importlib-metadata)
1907 ("python-six" ,python-six)
1908 ("python-parse" ,python-parse)
1909 ("python-parse-type" ,python-parse-type)))
1911 '(#:test-target "behave_test"))
1912 (home-page "https://github.com/behave/behave")
1913 (synopsis "Python behavior-driven development")
1915 "Behave is a tool for behavior-driven development in python.
1916 Behavior-driven development (or BDD) is an agile software development
1917 technique that encourages collaboration between developers, QA and
1918 non-technical or business participants in a software project. Behave uses
1919 tests written in a natural language style, backed up by Python code.")
1920 (license license:x11)))
1922 (define-public python-behave-web-api
1924 (name "python-behave-web-api")
1929 (uri (pypi-uri "behave-web-api" version))
1932 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
1933 (build-system python-build-system)
1936 (modify-phases %standard-phases
1937 (add-after 'unpack 'fix-dependencies
1939 (substitute* "setup.py"
1940 (("'wheel'") "") ; We don't use it.
1941 (("'ordereddict==1.1'") "")) ; Python >= 2.7 has it built-in.
1944 `(("behave" ,behave)
1945 ("python-requests" ,python-requests)))
1946 (home-page "https://github.com/jefersondaniel/behave-web-api")
1947 (synopsis "Provides testing for JSON APIs with Behave for Python")
1948 (description "This package provides testing utility modules for testing
1949 JSON APIs with Behave.")
1950 (license license:expat)))
1952 (define-public python2-behave-web-api
1953 (package-with-python2 python-behave-web-api))
1955 (define-public python-rednose
1957 (name "python-rednose")
1962 (uri (pypi-uri "rednose" version))
1965 "11x5nx5b4wdq04s7vj1gcdl07jvvkfb37p0r5lg773gr5rr8mj6h"))))
1966 (build-system python-build-system)
1968 `(#:phases (modify-phases %standard-phases
1969 (add-after 'unpack 'patch-setup.py
1971 ;; Six is only required for tests and later versions
1973 (substitute* "setup.py"
1974 (("six==1.10.0") "six"))
1977 `(("python-colorama" ,python-colorama)
1978 ("python-termstyle" ,python-termstyle)))
1980 `(("python-six" ,python-six)
1981 ("python-nose" ,python-nose)))
1982 (home-page "https://github.com/JBKahn/rednose")
1983 (synopsis "Colored output for Python nosetests")
1984 (description "This package provides colored output for the
1985 @command{nosetests} command of the Python Nose unit test framework.")
1986 (license license:bsd-3)))
1988 (define-public python2-rednose
1989 (package-with-python2 python-rednose))
1991 (define-public python-nose-randomly
1993 (name "python-nose-randomly")
1998 (uri (pypi-uri "nose-randomly" version))
2000 (base32 "0z662rqhfk4bjmg806mn4frb8nz4gbh7mrddsrhfffp1g4yklj3y"))))
2001 (build-system python-build-system)
2003 `(("python-nose" ,python-nose)
2004 ("python-numpy" ,python-numpy)))
2005 (home-page "https://github.com/adamchainz/nose-randomly")
2007 "Nose plugin to randomly order tests and control random.seed")
2009 "This is a @code{Nose} plugin to randomly order tests which can be quite
2010 powerful in discovering hidden flaws in the tests themselves, while helping to
2011 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
2012 by resetting it to a repeatable number for each test, enabling the tests to
2013 create data based on random numbers and yet remain repeatable.")
2014 (license license:bsd-3)))
2016 (define-public python2-nose-randomly
2017 (package-with-python2 python-nose-randomly))
2019 (define-public python-nose-timer
2021 (name "python-nose-timer")
2026 (uri (pypi-uri "nose-timer" version))
2028 (base32 "05wzkc88vbzw62pqkvhl33211b90kns0lny70b7qw62rcg4flzk4"))))
2029 (build-system python-build-system)
2031 `(("python-nose" ,python-nose)
2032 ("python-termcolor" ,python-termcolor)))
2033 (home-page "https://github.com/mahmoudimus/nose-timer")
2034 (synopsis "Timer plugin for nosetests")
2035 (description "Shows how much time was needed to run individual tests.")
2036 (license license:expat)))
2038 (define-public python2-nose-timer
2039 (package-with-python2 python-nose-timer))
2041 (define-public python-freezegun
2043 (name "python-freezegun")
2048 (uri (pypi-uri "freezegun" version))
2050 (base32 "1rx57v8ryjncjimg8hys9kx1r3rknvwcl4y340g20jn0sf69qk9a"))))
2051 (build-system python-build-system)
2053 `(("python-mock" ,python-mock)
2054 ("python-pytest" ,python-pytest)))
2056 `(("python-six" ,python-six)
2057 ("python-dateutil" ,python-dateutil)))
2060 (modify-phases %standard-phases
2061 ;; The tests are normally executed via `make test`, but the PyPi
2062 ;; package does not include the Makefile.
2065 (invoke "pytest" "-vv"))))))
2066 (home-page "https://github.com/spulec/freezegun")
2067 (synopsis "Test utility for mocking the datetime module")
2069 "FreezeGun is a library that allows your python tests to travel through
2070 time by mocking the datetime module.")
2071 (license license:asl2.0)))
2073 (define-public python2-freezegun
2074 (package-with-python2 python-freezegun))
2076 (define-public python-flexmock
2078 (name "python-flexmock")
2082 (uri (pypi-uri "flexmock" version))
2085 "0b6qw3grhgx58kxlkj7mdma7xdvlj02zabvcf7w2qifnfjwwwcsh"))))
2086 (build-system python-build-system)
2087 (home-page "https://flexmock.readthedocs.org")
2088 (synopsis "Testing library for Python")
2090 "flexmock is a testing library for Python that makes it easy to create
2091 mocks, stubs and fakes.")
2092 (license license:bsd-3)))
2094 (define-public python2-flexmock
2095 (package-with-python2 python-flexmock))
2097 (define-public python-flaky
2099 (name "python-flaky")
2103 (uri (pypi-uri "flaky" version))
2106 "1nm1kjf857z5aw7v642ffsy1vwf255c6wjvmil71kckjyd0mxg8j"))))
2107 (build-system python-build-system)
2109 ;; TODO: Tests require 'coveralls' and 'genty' which are not in Guix yet.
2111 (home-page "https://github.com/box/flaky")
2112 (synopsis "Automatically rerun flaky tests")
2114 "Flaky is a plugin for @code{nose} or @code{py.test} that automatically
2117 Ideally, tests reliably pass or fail, but sometimes test fixtures must rely
2118 on components that aren't 100% reliable. With flaky, instead of removing
2119 those tests or marking them to @code{@@skip}, they can be automatically
2121 (license license:asl2.0)))
2123 (define-public python2-flaky
2124 (package-with-python2 python-flaky))
2126 (define-public python-pyhamcrest
2127 ;; The latest release was in 2016 and its test suite does not work with recent
2128 ;; versions of Pytest. Just take the master branch for now, which seems stable.
2129 (let ((commit "25fdc5f00bdf3084335353bc9247253098ec4cf2")
2132 (name "python-pyhamcrest")
2133 (version (git-version "1.9.0" revision commit))
2135 ;; Tests not distributed from pypi release.
2138 (url "https://github.com/hamcrest/PyHamcrest")
2140 (file-name (git-file-name name version))
2143 "1miqmhhi68vaix8sqc1lvpvbm27bacffxh5anm5cbfsvk7g9n6f3"))))
2144 (native-inputs ;all native inputs are for tests
2145 `(("python-pytest-cov" ,python-pytest-cov)
2146 ("python-mock" ,python-mock)
2147 ("python-pytest" ,python-pytest)
2148 ("python-hypothesis" ,python-hypothesis)))
2150 `(("python-six" ,python-six)))
2151 (build-system python-build-system)
2153 `(#:phases (modify-phases %standard-phases
2156 (setenv "PYTHONPATH"
2157 (string-append "build/lib:"
2158 (getenv "PYTHONPATH")))
2159 (invoke "pytest" "-vv"))))))
2160 (home-page "http://hamcrest.org/")
2161 (synopsis "Hamcrest matchers for Python")
2163 "PyHamcrest is a framework for writing matcher objects,
2164 allowing you to declaratively define \"match\" rules.")
2165 (license license:bsd-3))))
2167 (define-public python2-pyhamcrest
2168 (package-with-python2 python-pyhamcrest))
2170 (define-public unittest-cpp
2172 (name "unittest-cpp")
2177 (url "https://github.com/unittest-cpp/unittest-cpp")
2178 (commit (string-append "v" version))))
2179 (file-name (git-file-name name version))
2181 (base32 "0sxb3835nly1jxn071f59fwbdzmqi74j040r81fanxyw3s1azw0i"))))
2183 `(#:tests? #f)) ; It's run after build automatically.
2184 (build-system cmake-build-system)
2185 (home-page "https://github.com/unittest-cpp/unittest-cpp")
2186 (synopsis "Lightweight unit testing framework for C++")
2187 (description "UnitTest++ is a lightweight unit testing framework for C++.
2188 It was designed to do test-driven development on a wide variety of platforms.
2189 Simplicity, portability, speed, and small footprint are all very important
2190 aspects of UnitTest++. UnitTest++ is mostly standard C++ and makes minimal use
2191 of advanced library and language features, which means it should be easily
2192 portable to just about any platform.")
2193 (license license:expat)))
2195 (define-public libfaketime
2197 (name "libfaketime")
2199 (home-page "https://github.com/wolfcw/libfaketime")
2204 (commit (string-append "v" version))))
2207 "1mfdl82ppgbdvy1ny8mb7xii7p0g7awvn4bn36jb8v4r545slmjc"))
2208 (file-name (git-file-name name version))))
2209 (build-system gnu-build-system)
2211 '(#:phases (modify-phases %standard-phases
2213 (lambda* (#:key outputs #:allow-other-keys)
2214 (let ((out (assoc-ref outputs "out")))
2216 (setenv "PREFIX" out)
2218 (add-before 'check 'pre-check
2220 (substitute* "test/functests/test_exclude_mono.sh"
2221 (("/bin/bash") (which "bash")))
2223 #:test-target "test"))
2225 `(("perl" ,perl))) ;for tests
2226 (synopsis "Fake the system time for single applications")
2228 "The libfaketime library allows users to modify the system time that an
2229 application \"sees\". It is meant to be loaded using the dynamic linker's
2230 @code{LD_PRELOAD} environment variable. The @command{faketime} command
2231 provides a simple way to achieve this.")
2232 (license license:gpl2)))
2234 (define-public umockdev
2240 (uri (string-append "https://github.com/martinpitt/umockdev/"
2241 "releases/download/" version "/"
2242 "umockdev-" version ".tar.xz"))
2245 "095v3abc321s584sga04y16lcmdzsdi88h24wcrm78v7vq484g74"))))
2246 (build-system gnu-build-system)
2249 (modify-phases %standard-phases
2250 (add-after 'unpack 'skip-broken-test
2252 (substitute* "tests/test-umockdev.c"
2253 (("/\\* sys/ in other dir")
2254 (string-append "return; // ")))
2258 ("gtk-doc" ,gtk-doc)
2259 ("pkg-config" ,pkg-config)
2267 ("libgudev" ,libgudev)
2268 ("gobject-introspection" ,gobject-introspection)))
2269 (home-page "https://github.com/martinpitt/umockdev/")
2270 (synopsis "Mock hardware devices for creating unit tests")
2271 (description "umockdev mocks hardware devices for creating integration
2272 tests for hardware related libraries and programs. It also provides tools to
2273 record the properties and behaviour of particular devices, and to run a
2274 program or test suite under a test bed with the previously recorded devices
2276 (license license:lgpl2.1+)))
2278 (define-public python-pyfakefs
2280 (name "python-pyfakefs")
2284 ;; We use the PyPI URL because there is no proper release
2285 ;; available from GitHub. The GitHub project only provides
2286 ;; autogenerated tarballs, which are known to change in place.
2287 (uri (pypi-uri "pyfakefs" version))
2290 "0qb9jp0bqhc0dv0rn805fv99029fvx135f3bvka6scfkcl6jgllc"))
2291 (patches (search-patches
2292 "python-pyfakefs-remove-bad-test.patch"))
2293 (file-name (string-append name "-" version ".tar.gz"))))
2296 (modify-phases %standard-phases
2297 ;; The default test suite does not run these extra tests.
2298 (add-after 'check 'check-pytest-plugin
2301 "python" "-m" "pytest"
2302 "pyfakefs/pytest_tests/pytest_plugin_test.py")
2305 `(("python-pytest" ,python-pytest)))
2306 (build-system python-build-system)
2307 ;; Guix lint doesn't like that this is a permanent redirect to the GitHub
2308 ;; page, but the pyfakefs documentation asks us to use this specific URL
2309 ;; when linking to the project. Honor their request.
2310 (home-page "http://pyfakefs.org/")
2311 ;; TRANSLATORS: In the synopsis, "Mock" is a verb.
2312 (synopsis "Mock file system interactions in tests")
2314 "This package provides a Python library intended for use in automated
2315 tests. One difficulty when testing software is that the code under test might
2316 need to read or write to files in the local file system. If the file system
2317 is not set up in just the right way, it might cause a spurious error during
2318 the test. The pyfakefs library provides a solution to problems like this by
2319 mocking file system interactions. In other words, it arranges for the code
2320 under test to interact with a fake file system instead of the real file
2321 system. The code under test requires no modification to work with pyfakefs.")
2322 (license license:asl2.0)))
2324 (define-public python2-pyfakefs
2325 (package-with-python2 python-pyfakefs))