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 "17s2kzmkw3kfjhpp72rfppyd7syr7bdq5s69syj2nvrlwd3d4irz"))))
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 ;; Some packages require this newer version of cppunit. However, it needs
160 ;; C++11 support, which is not enabled by default in our current GCC, and
161 ;; updating in-place would require adding CXXFLAGS to many dependent packages.
162 ;; Thus, keep as a separate variable for now.
163 ;; TODO: Remove this when our default GCC is updated to 6 or higher.
164 (define-public cppunit-1.14
170 (uri (string-append "https://dev-www.libreoffice.org/src/"
171 "cppunit-" version ".tar.gz"))
174 "1027cyfx5gsjkdkaf6c2wnjh68882grw8n672018cj3vs9lrhmix"))))))
176 ;; When dependent packages upgraded to use newer version of catch, this one should
178 (define-public catch-framework
181 (version "1.3.5") ;Sub-minor is the build number
185 (url "https://github.com/philsquared/Catch")
187 (commit "ae5ee2cf63d6d67bd1369b512d2a7b60b571c907")))
188 (file-name (string-append name "-" version))
191 "1yfb3lxv929szqy1nw9xw3d45wzkppziqshkjxvrb1fdmf46x564"))))
192 (build-system trivial-build-system)
194 `(#:modules ((guix build utils))
196 (use-modules (guix build utils))
197 (let* ((source (assoc-ref %build-inputs "source"))
198 (output (assoc-ref %outputs "out"))
199 (incdir (string-append output "/include"))
200 (docdir (string-append output "/share/doc/catch-"
202 (for-each mkdir-p (list incdir docdir))
203 (install-file (string-append source
204 "/single_include/catch.hpp")
206 (copy-recursively (string-append source "/docs")
209 (home-page "http://catch-lib.net/")
210 (synopsis "Automated test framework for C++ and Objective-C")
212 "Catch stands for C++ Automated Test Cases in Headers and is a
213 multi-paradigm automated test framework for C++ and Objective-C.")
214 (license license:boost1.0)))
216 (define-public catch-framework2
220 (home-page "https://github.com/catchorg/Catch2")
224 (url "https://github.com/catchorg/Catch2")
225 (commit (string-append "v" version))))
226 (file-name (git-file-name name version))
229 "1gdp5wm8khn02g2miz381llw3191k7309qj8s3jd6sasj01rhf23"))))
230 (build-system cmake-build-system)
231 (synopsis "Automated test framework for C++ and Objective-C")
232 (description "Catch2 stands for C++ Automated Test Cases in Headers and is
233 a multi-paradigm automated test framework for C++ and Objective-C.")
234 (license license:boost1.0)))
236 (define-public cmdtest
242 (uri (string-append "http://git.liw.fi/cmdtest/snapshot/"
243 name "-" version ".tar.gz"))
246 "1jmfiyrrqmpvwdb273bkb8hjaf4rwx9njblx29pmr7giyahskwi5"))))
247 (build-system python-build-system)
251 (modify-phases %standard-phases
252 ;; check phase needs to be run before the build phase. If not, the
253 ;; coverage test runner looks for tests for the built source files,
256 (add-before 'build 'check
259 (("/bin/sh") (which "sh")))
260 ;; yarn uses python2-ttystatus to print messages.
261 ;; python2-ttystatus requires /dev/tty which is not present in
262 ;; the build environment. Hence assuming-failure test fails.
263 (delete-file "yarn.tests/assuming-failure.script")
264 (delete-file "yarn.tests/assuming-failure.stdout")
265 (invoke "python" "setup.py" "check"))))))
267 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)))
269 `(("python2-cliapp" ,python2-cliapp)
270 ("python2-markdown" ,python2-markdown)
271 ("python2-ttystatus" ,python2-ttystatus)))
272 (home-page "https://liw.fi/cmdtest/")
273 (synopsis "Black box Unix program tester")
275 "@code{cmdtest} black box tests Unix command line tools. Roughly, it is
276 given a command line and input files, and the expected output, and it verifies
277 that the command line produces the expected output. If not, it reports a
278 problem, and shows the differences.")
279 (license license:gpl3+)))
281 (define-public cmocka
287 (uri (string-append "https://cmocka.org/files/"
288 (version-major+minor version) "/cmocka-"
292 "1bxzzafjlwzgldcb07hjnlnqvh88wh21r2kw7z8f704w5bvvrsj3"))))
293 (build-system cmake-build-system)
295 `(#:tests? #f)) ; no test target
296 (home-page "https://cmocka.org/")
297 (synopsis "Unit testing framework for C")
298 (description "Cmocka is a unit testing framework for C with support for
299 mock objects. It only requires the standard C library, and works with
300 different compilers. Cmocka supports several different message output formats
301 like Test Anything Protocol, Subunit, xUnit XML or the original cmockery output
303 (license license:asl2.0)))
305 (define-public cppcheck
312 (url "https://github.com/danmar/cppcheck")
314 (file-name (git-file-name name version))
316 (base32 "1xiy54rz99nzbpwj35jiyssd2nc6k5k0lw5ml6nh2qnmbfkl8swl"))))
317 (build-system cmake-build-system)
319 '(#:configure-flags '("-DBUILD_TESTS=ON")))
320 (home-page "http://cppcheck.sourceforge.net")
321 (synopsis "Static C/C++ code analyzer")
322 (description "Cppcheck is a static code analyzer for C and C++. Unlike
323 C/C++ compilers and many other analysis tools it does not detect syntax errors
324 in the code. Cppcheck primarily detects the types of bugs that the compilers
325 normally do not detect. The goal is to detect only real errors in the code
326 (i.e. have zero false positives).")
327 (license license:gpl3+)))
329 (define-public cxxtest
335 (uri (string-append "mirror://sourceforge/cxxtest/cxxtest/"
336 version "/cxxtest-" version ".tar.gz"))
339 "1n7pbj4z9ivx005hqvivj9ddhq8awynzg6jishfbypf6j7ply58w"))))
340 (build-system python-build-system)
343 (modify-phases %standard-phases
344 (add-after 'unpack 'chdir-to-source
348 (add-after 'install 'install-headers
349 (lambda* (#:key outputs #:allow-other-keys)
350 (let* ((out (assoc-ref outputs "out"))
351 (include-dir (string-append out "/include/cxxtest")))
352 (for-each (lambda (header-file)
353 (install-file header-file include-dir))
354 (find-files "../cxxtest"))
356 (add-after 'install 'install-doc
357 (lambda* (#:key outputs #:allow-other-keys)
358 (let* ((out (assoc-ref outputs "out"))
359 (doc-dir (string-append out "/share/doc/cxxtest")))
360 (install-file "../README" doc-dir)
361 (install-file "../doc/guide.txt" doc-dir)
362 (copy-recursively "../sample" (string-append doc-dir "/sample"))
365 `(("python-ply" ,python-ply)))
366 (home-page "https://cxxtest.com/")
367 (synopsis "Unit testing framework for C++")
368 (description "CxxTest is a unit testing framework for C++ that is similar
369 in spirit to JUnit, CppUnit, and xUnit. CxxTest does not require precompiling
370 a CxxTest testing library, it employs no advanced features of C++ (e.g. RTTI)
371 and it supports a very flexible form of test discovery.")
372 (license license:lgpl3+)))
374 (define-public go-gopkg.in-check.v1
375 (let ((commit "788fd78401277ebd861206a03c884797c6ec5541")
378 (name "go-gopkg.in-check.v1")
379 (version (git-version "0.0.0" revision commit))
383 (url "https://github.com/go-check/check.git")
385 (file-name (git-file-name name version))
388 "0v3bim0j375z81zrpr5qv42knqs0y2qv2vkjiqi5axvb78slki1a"))))
389 (build-system go-build-system)
391 '(#:import-path "gopkg.in/check.v1"))
393 `(("go-github-com-kr-pretty" ,go-github-com-kr-pretty)))
394 (synopsis "Rich testing extension for Go's testing package")
396 "@code{check} is a rich testing extension for Go's testing package.")
397 (home-page "https://github.com/go-check/check")
398 (license license:bsd-2))))
400 (define-public go-github.com-smartystreets-gunit
402 (name "go-github.com-smartystreets-gunit")
407 (url "https://github.com/smartystreets/gunit")
409 (file-name (git-file-name name version))
412 "00m4zg0kdj49mnpmf9klb44ba71p966xsk6zknrzqgfc8119f35z"))))
413 (build-system go-build-system)
415 '(;; TODO: This package depends on go-github.com-smartystreets-assertions
416 ;; for running the tests, but go-github.com-smartystreets-assertions
417 ;; depends on this package, so break this loop by not running the tests
420 #:import-path "github.com/smartystreets/gunit"))
421 (synopsis "Testing tool for Go, in the style of xUnit")
423 "@code{gunit} allows the test author to use a struct as the scope for a
424 group of related test cases, in the style of xUnit fixtures. This makes
425 extraction of setup/teardown behavior (as well as invoking the system under
426 test) much simpler.")
427 (home-page "https://github.com/smartystreets/gunit")
428 (license license:expat)))
430 (define-public go-github.com-smartystreets-assertions
432 (name "go-github.com-smartystreets-assertions")
437 (url "https://github.com/smartystreets/assertions")
439 (file-name (git-file-name name version))
442 "1j0adgbykl55rf2945g0n5bmqdsnjcqlx5dcmpfh4chki43hiwg9"))))
443 (build-system go-build-system)
445 '(#:import-path "github.com/smartystreets/assertions"))
447 `(("go-github.com-smartystreets-gunit" ,go-github.com-smartystreets-gunit)))
448 (synopsis "Assertions for testing with Go")
450 "The @code{assertions} package provides convenient assertion functions
451 for writing tests in Go.")
452 (home-page "https://github.com/smartystreets/assertions")
453 (license license:expat)))
455 (define-public go-github.com-smartystreets-goconvey
457 (name "go-github.com-smartystreets-goconvey")
462 (url "https://github.com/smartystreets/goconvey")
464 (file-name (git-file-name name version))
467 "1ph18rkl3ns3fgin5i4j54w5a69grrmf3apcsmnpdn1wlrbs3dxh"))))
468 (build-system go-build-system)
470 '(#:import-path "github.com/smartystreets/goconvey"))
472 `(("go-github.com-jtolds-gls" ,go-github.com-jtolds-gls)
473 ("go-github.com-smartystreets-assertions" ,go-github.com-smartystreets-assertions)))
474 (synopsis "Go testing tool with both a web and terminal user interface")
476 "GoConvey is a testing tool for Go. It integrates with go test, can show
477 test coverage and has a web user interface that will refresh automatically.")
478 (home-page "https://github.com/smartystreets/goconvey")
479 (license license:expat)))
481 ;; XXX When updating, check whether ZNC's GOOGLETEST-SOURCES can be
482 ;; switched back to simply using (PACKAGE-SOURCE ...).
483 (define-public googletest
491 (url "https://github.com/google/googletest.git")
492 (commit (string-append "release-" version))))
493 (file-name (git-file-name name version))
496 "0bjlljmbf8glnd9qjabx73w6pd7ibv43yiyngqvmvgxsabzr8399"))))
497 (build-system cmake-build-system)
499 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
501 `(("python-2" ,python-2)))
502 (home-page "https://github.com/google/googletest/")
503 (synopsis "Test discovery and XUnit test framework")
504 (description "Google Test features an XUnit test framework, automated test
505 discovery, death tests, assertions, parameterized tests and XML test report
507 (license license:bsd-3)))
509 (define-public cpputest
516 (uri (string-append "https://github.com/cpputest/cpputest/releases/download/v"
517 version "/cpputest-" version ".tar.gz"))
520 "0mk48xd3klyqi7wf3f4wn4zqxxzmvrhhl32r25jzrixzl72wq7f8"))))
521 (build-system gnu-build-system)
523 `(("googletest" ,googletest)))
524 (home-page "https://cpputest.github.io/")
525 (synopsis "Unit testing and mocking framework for C/C++")
527 "CppUTest is a C/C++ based unit xUnit test framework. It is written in
528 C++ but is used in C and C++ projects and frequently used in embedded systems
529 but it works for any C/C++ project.")
530 (license license:bsd-3)))
532 (define-public python-parameterized
534 (name "python-parameterized")
539 (uri (pypi-uri "parameterized" version))
542 "1qj1939shm48d9ql6fm1nrdy4p7sdyj8clz1szh5swwpf1qqxxfa"))))
543 (build-system python-build-system)
544 (arguments '(#:tests? #f)) ; there are no tests
545 (home-page "https://github.com/wolever/parameterized")
546 (synopsis "Parameterized testing with any Python test framework")
548 "Parameterized is a Python library that aims to fix parameterized testing
549 for every Python test framework. It supports nose, py.test, and unittest.")
550 (license license:bsd-2)))
552 (define-public python2-parameterized
553 (package-with-python2 python-parameterized))
555 (define-public python-minimock
557 (name "python-minimock")
562 (uri (pypi-uri "MiniMock" version))
565 "0k2sxb1ibnyg05iblz7zhbv825f1zk9906rab7883iqgvzmdzpsz"))))
566 (build-system python-build-system)
567 (home-page "https://pypi.org/project/MiniMock")
568 (synopsis "Simple Python library for using mock objects")
569 (description "MiniMock is a simple library for building mock objects with
571 (license license:expat)))
573 (define-public python2-minimock
574 (package-with-python2 python-minimock))
576 (define-public python-mock
583 (uri (pypi-uri "mock" version))
586 "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
588 `(("python-pbr" ,python-pbr-minimal)
589 ("python-six" ,python-six)))
590 (build-system python-build-system)
592 `(("python-unittest2" ,python-unittest2)))
595 (modify-phases %standard-phases
598 (zero? (system* "unit2")))))))
599 (home-page "https://github.com/testing-cabal/mock")
600 (synopsis "Python mocking and patching library for testing")
602 "Mock is a library for testing in Python. It allows you to replace parts
603 of your system under test with mock objects and make assertions about how they
605 (properties `((python2-variant . ,(delay python2-mock))))
606 (license license:expat)))
608 (define-public python2-mock
609 (let ((base (package-with-python2
610 (strip-python2-variant python-mock))))
611 (package (inherit base)
613 `(("python2-functools32" ,python2-functools32)
614 ("python2-funcsigs" ,python2-funcsigs)
615 ,@(package-propagated-inputs base))))))
617 (define-public python-nose
624 (uri (pypi-uri "nose" version))
627 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
628 (build-system python-build-system)
630 '(#:tests? #f)) ; FIXME: test suite fails
631 (home-page "http://readthedocs.org/docs/nose/")
632 (synopsis "Python testing library")
634 "Nose extends the unittest library to make testing easier.")
635 (license license:lgpl2.0+)))
637 (define-public python2-nose
638 (package-with-python2 python-nose))
640 (define-public python-nose2
642 (name "python-nose2")
647 (uri (pypi-uri "nose2" version))
650 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
651 (build-system python-build-system)
652 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
654 `(("python-cov-core" ,python-cov-core)
655 ("python-pytest-cov" ,python-pytest-cov)
656 ("python-six" ,python-six)))
657 (home-page "https://github.com/nose-devs/nose2")
658 (synopsis "Next generation of nicer testing for Python")
660 "Nose2 is the next generation of nicer testing for Python, based on the
661 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
662 better plugin api, being easier for users to configure, and simplifying internal
663 interfaces and processes.")
664 (license license:bsd-2)))
666 (define-public python2-nose2
667 (package-with-python2 python-nose2))
669 (define-public python-unittest2
671 (name "python-unittest2")
676 (uri (pypi-uri "unittest2" version))
678 (search-patches "python-unittest2-python3-compat.patch"
679 "python-unittest2-remove-argparse.patch"))
682 "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212"))))
683 (build-system python-build-system)
686 (modify-phases %standard-phases
689 (zero? (system* "python" "-m" "unittest2" "discover" "--verbose")))))))
691 `(("python-six" ,python-six)
692 ("python-traceback2" ,python-traceback2)))
693 (home-page "http://pypi.python.org/pypi/unittest2")
694 (synopsis "Python unit testing library")
696 "Unittest2 is a replacement for the unittest module in the Python
698 (license license:psfl)))
700 (define-public python2-unittest2
701 (package-with-python2 python-unittest2))
703 (define-public python-pytest
705 (name "python-pytest")
710 (uri (pypi-uri "pytest" version))
713 "17grcfvd6ggvvqmprwv5y8g319nayam70hr43ssjwj40ws27z858"))))
714 (build-system python-build-system)
717 (modify-phases %standard-phases
718 (add-before 'check 'disable-invalid-tests
720 ;; Some tests involves the /usr directory, and fails.
721 (substitute* "testing/test_argcomplete.py"
722 (("def test_remove_dir_prefix\\(self\\):")
723 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):"))
724 (substitute* "testing/test_argcomplete.py"
725 (("def test_remove_dir_prefix" line)
726 (string-append "@pytest.mark.skip"
727 "(reason=\"Assumes that /usr exists.\")\n "
730 (replace 'check (lambda _ (invoke "pytest" "-vv"))))))
732 `(("python-atomicwrites" ,python-atomicwrites)
733 ("python-attrs" ,python-attrs-bootstrap)
734 ("python-more-itertools" ,python-more-itertools)
735 ("python-pluggy" ,python-pluggy)
736 ("python-py" ,python-py)
737 ("python-six" ,python-six-bootstrap)))
739 `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
741 ("python-hypothesis" ,python-hypothesis)
742 ("python-nose" ,python-nose)
743 ("python-mock" ,python-mock)
744 ("python-pytest" ,python-pytest-bootstrap)
745 ("python-setuptools-scm" ,python-setuptools-scm)))
746 (home-page "https://docs.pytest.org/en/latest/")
747 (synopsis "Python testing library")
749 "Pytest is a testing tool that provides auto-discovery of test modules
750 and functions, detailed info on failing assert statements, modular fixtures,
751 and many external plugins.")
752 (license license:expat)
753 (properties `((python2-variant . ,(delay python2-pytest))))))
755 (define-public python2-pytest
756 (let ((pytest (package-with-python2
757 (strip-python2-variant python-pytest))))
761 `(("python2-funcsigs" ,python2-funcsigs)
762 ("python2-pathlib2" ,python2-pathlib2)
763 ,@(package-propagated-inputs pytest))))))
765 (define-public python-pytest-bootstrap
767 (inherit (strip-python2-variant python-pytest))
768 (name "python-pytest-bootstrap")
769 (native-inputs `(("python-setuptools-scm" ,python-setuptools-scm)))
770 (arguments `(#:tests? #f))
771 (properties `((python2-variant . ,(delay python2-pytest-bootstrap))))))
773 (define-public python2-pytest-bootstrap
774 (let ((pytest (package-with-python2
775 (strip-python2-variant python-pytest-bootstrap))))
776 (package (inherit pytest)
778 `(("python2-funcsigs" ,python2-funcsigs-bootstrap)
779 ("python2-pathlib2" ,python2-pathlib2-bootstrap)
780 ,@(package-propagated-inputs pytest))))))
782 (define-public python-pytest-cov
784 (name "python-pytest-cov")
789 (uri (pypi-uri "pytest-cov" version))
791 (base32 "0cyxbbghx2l4p60w10k00j1j74q1ngfiffr0pxn73ababjr69dha"))))
792 (build-system python-build-system)
795 (modify-phases %standard-phases
798 ;; Options taken from tox.ini.
799 ;; TODO: make "--restructuredtext" tests pass. They currently fail
800 ;; with "Duplicate implicit target name".
801 (invoke "python" "./setup.py" "check"
802 "--strict" "--metadata"))))))
804 `(("python-coverage" ,python-coverage)
805 ("python-pytest" ,python-pytest)))
806 (home-page "https://github.com/pytest-dev/pytest-cov")
807 (synopsis "Pytest plugin for measuring coverage")
809 "Pytest-cov produces coverage reports. It supports centralised testing and
810 distributed testing in both @code{load} and @code{each} modes. It also
811 supports coverage of subprocesses.")
812 (license license:expat)))
814 (define-public python2-pytest-cov
815 (package-with-python2 python-pytest-cov))
817 (define-public python-pytest-runner
819 (name "python-pytest-runner")
824 (uri (pypi-uri "pytest-runner" version))
827 "1gkpyphawxz38ni1gdq1fmwyqcg02m7ypzqvv46z06crwdxi2gyj"))))
828 (build-system python-build-system)
830 `(("python-pytest" ,python-pytest-bootstrap)
831 ("python-setuptools-scm" ,python-setuptools-scm)))
832 (home-page "https://github.com/pytest-dev/pytest-runner")
833 (synopsis "Invoke py.test as a distutils command")
835 "This package provides a @command{pytest-runner} command that
836 @file{setup.py} files can use to run tests.")
837 (license license:expat)))
839 (define-public python2-pytest-runner
840 (package-with-python2 python-pytest-runner))
842 (define-public python-pytest-mock
844 (name "python-pytest-mock")
849 (uri (pypi-uri "pytest-mock" version))
852 "1i5mg3ff1qk0wqfcxfz60hwy3q5dskdp36i10ckigkzffg8hc3ad"))))
853 (build-system python-build-system)
855 `(("python-setuptools-scm" ,python-setuptools-scm)))
857 `(("python-pytest" ,python-pytest)))
858 (home-page "https://github.com/pytest-dev/pytest-mock/")
859 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
861 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
862 around the patching API provided by the @code{mock} package, but with the
863 benefit of not having to worry about undoing patches at the end of a test.
864 The mocker fixture has the same API as @code{mock.patch}, supporting the
866 (properties `((python2-variant . ,(delay python2-pytest-mock))))
867 (license license:expat)))
869 (define-public python2-pytest-mock
870 (let ((base (package-with-python2
871 (strip-python2-variant python-pytest-mock))))
872 (package (inherit base)
874 `(("python2-mock" ,python2-mock)
875 ,@(package-propagated-inputs base))))))
877 (define-public python-pytest-xdist
879 (name "python-pytest-xdist")
884 (uri (pypi-uri "pytest-xdist" version))
887 "1d812apvcmshh2l8f38spqwb3bpp0x43yy7lyfpxxzc99h4r7y4n"))
888 (modules '((guix build utils)))
891 ;; Remove pre-compiled .pyc files from source.
892 (for-each delete-file-recursively
893 (find-files "." "__pycache__" #:directories? #t))
894 (for-each delete-file (find-files "." "\\.pyc$"))
896 (build-system python-build-system)
898 '(#:tests? #f)) ;FIXME: Some tests are failing.
900 ;; (modify-phases %standard-phases
902 ;; (add-after 'install 'check
903 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
904 ;; (add-installed-pythonpath inputs outputs)
905 ;; (zero? (system* "py.test" "-v")))))
907 `(("python-setuptools-scm" ,python-setuptools-scm)))
909 `(("python-execnet" ,python-execnet)
910 ("python-pytest" ,python-pytest)
911 ("python-py" ,python-py)))
913 "https://github.com/pytest-dev/pytest-xdist")
915 "Plugin for py.test with distributed testing and loop-on-failing modes")
917 "The pytest-xdist plugin extends py.test with some unique test execution
918 modes: parallelization, running tests in boxed subprocesses, the ability
919 to run tests repeatedly when failed, and the ability to run tests on multiple
920 Python interpreters or platforms. It uses rsync to copy the existing
921 program code to a remote location, executes there, and then syncs the
923 (license license:expat)))
925 (define-public python2-pytest-xdist
926 (package-with-python2 python-pytest-xdist))
928 (define-public python-pytest-timeout
930 (name "python-pytest-timeout")
935 (uri (pypi-uri "pytest-timeout" version))
938 "1cczcjhw4xx5sjkhxlhc5c1bkr7x6fcyx12wrnvwfckshdvblc2a"))))
939 (build-system python-build-system)
941 `(("python-pytest" ,python-pytest)))
942 (home-page "http://bitbucket.org/pytest-dev/pytest-timeout/")
943 (synopsis "Plugin for py.test to abort hanging tests")
945 "This package provides a py.test plugin that aborts hanging tests after a
946 timeout has been exceeded.")
947 (license license:expat)))
949 (define-public python-scripttest
951 (name "python-scripttest")
956 (uri (pypi-uri "scripttest" version))
959 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
960 (build-system python-build-system)
962 `(("python-pytest" ,python-pytest)))
963 (home-page "http://pythonpaste.org/scripttest/")
964 (synopsis "Python library to test command-line scripts")
965 (description "Scripttest is a Python helper library for testing
966 interactive command-line applications. With it you can run a script in a
967 subprocess and see the output as well as any file modifications.")
968 (license license:expat)))
970 (define-public python2-scripttest
971 (package-with-python2 python-scripttest))
973 (define-public python-testtools-bootstrap
975 (name "python-testtools-bootstrap")
980 (uri (pypi-uri "testtools" version))
983 "0n8519lk8aaa91vymz842831181wf7fss98hyllhygi3z1nfq9sq"))
984 (patches (search-patches "python-testtools.patch"))))
985 (build-system python-build-system)
986 (arguments '(#:tests? #f))
988 `(("python-extras" ,python-extras)
989 ("python-fixtures" ,python-fixtures-bootstrap)
990 ("python-mimeparse" ,python-mimeparse)
991 ("python-pbr" ,python-pbr-minimal)
992 ("python-six" ,python-six)
993 ("python-traceback2" ,python-traceback2)
994 ("python-unittest2" ,python-unittest2)))
995 (home-page "https://github.com/testing-cabal/testtools")
997 "Extensions to the Python standard library unit testing framework")
999 "This package is only for bootstrapping. Do not use this.")
1000 (license license:psfl)))
1002 (define-public python2-testtools-bootstrap
1003 (package-with-python2 python-testtools-bootstrap))
1005 (define-public python-testtools
1007 (inherit python-testtools-bootstrap)
1008 (name "python-testtools")
1010 `(#:phases (modify-phases %standard-phases
1013 (invoke "python" "-m" "testtools.run"
1014 "testtools.tests.test_suite"))))))
1016 `(("python-extras" ,python-extras)
1017 ("python-fixtures" ,python-fixtures)
1018 ("python-mimeparse" ,python-mimeparse)
1019 ("python-pbr" ,python-pbr)
1020 ("python-six" ,python-six)
1021 ("python-traceback2" ,python-traceback2)
1022 ("python-unittest2" ,python-unittest2)))
1024 `(("python-testscenarios" ,python-testscenarios-bootstrap)))
1026 "Testtools extends the Python standard library unit testing framework to
1027 provide matchers, more debugging information, and cross-Python
1030 (define-public python2-testtools
1031 (package-with-python2 python-testtools))
1033 (define-public python-testscenarios-bootstrap
1035 (name "python-testscenarios-bootstrap")
1040 (uri (pypi-uri "testscenarios" version))
1043 "1dm2aydqpv76vnsk1pw7k8n42hq58cfi4n1ixy7nyzpaj1mwnmy2"))))
1044 (build-system python-build-system)
1046 `(#:phases (modify-phases %standard-phases
1049 (invoke "python" "-m" "testtools.run"
1050 "testscenarios.test_suite"))))))
1052 `(("python-pbr" ,python-pbr-minimal)
1053 ("python-testtools" ,python-testtools-bootstrap)))
1054 (home-page "https://launchpad.net/testscenarios")
1055 (synopsis "Pyunit extension for dependency injection")
1057 "This package is only for bootstrapping. Don't use this.")
1058 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1060 (define-public python2-testscenarios-bootstrap
1061 (package-with-python2 python-testscenarios-bootstrap))
1063 (define-public python-testscenarios
1065 (inherit python-testscenarios-bootstrap)
1066 (name "python-testscenarios")
1068 `(("python-pbr" ,python-pbr)
1069 ("python-testtools" ,python-testtools)))
1071 "Testscenarios provides clean dependency injection for Python unittest
1074 (define-public python2-testscenarios
1075 (package-with-python2 python-testscenarios))
1077 ;; Testresources requires python-pbr at runtime, but pbr needs it for its
1078 ;; own tests. Hence this bootstrap variant.
1079 (define-public python-testresources-bootstrap
1081 (name "python-testresources-bootstrap")
1085 (uri (pypi-uri "testresources" version))
1088 "05s4dsli9g17m1r3b1gvwicbbgq011hnpb2b9qnj27ja2n11k7gf"))))
1089 (build-system python-build-system)
1090 (arguments '(#:tests? #f))
1092 `(("python-pbr" ,python-pbr-minimal)))
1093 (home-page "https://launchpad.net/testresources")
1095 "Pyunit extension for managing test resources")
1097 "This package is only here for bootstrapping purposes. Use the regular
1098 testresources package instead.")
1099 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1101 (define-public python2-testresources-bootstrap
1102 (package-with-python2 python-testresources-bootstrap))
1104 (define-public python-testresources
1106 (inherit python-testresources-bootstrap)
1107 (name "python-testresources")
1109 `(("python-pbr" ,python-pbr)))
1112 `(("python-fixtures" ,python-fixtures)
1113 ("python-testtols" ,python-testtools)))
1115 "Testresources is an extension to Python's unittest to allow declarative
1116 use of resources by test cases.")))
1118 (define-public python2-testresources
1119 (package-with-python2 python-testresources))
1121 (define-public python-subunit-bootstrap
1123 (name "python-subunit-bootstrap")
1128 (uri (pypi-uri "python-subunit" version))
1131 "1fsw8rsn1s3nklx06mayrg5rn2zbky6wwjc5z07s7rf1wjzfs1wn"))))
1132 (build-system python-build-system)
1134 `(("python-extras" ,python-extras)
1135 ("python-testtools" ,python-testtools-bootstrap)))
1137 `(("python-fixtures" ,python-fixtures-bootstrap)
1138 ("python-hypothesis" ,python-hypothesis)
1139 ("python-testscenarios" ,python-testscenarios-bootstrap)))
1140 (home-page "https://launchpad.net/subunit")
1141 (synopsis "Python implementation of the subunit protocol")
1143 "This package is here for bootstrapping purposes only. Use the regular
1144 python-subunit package instead.")
1145 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1147 (define-public python2-subunit-bootstrap
1148 (package-with-python2 python-subunit-bootstrap))
1150 (define-public python-subunit
1152 (inherit python-subunit-bootstrap)
1153 (name "python-subunit")
1155 `(("python-extras" ,python-extras)
1156 ("python-testtools" ,python-testtools)))
1158 `(("python-fixtures" ,python-fixtures)
1159 ("python-hypothesis" ,python-hypothesis)
1160 ("python-testscenarios" ,python-testscenarios)))
1162 "Python-subunit is a Python implementation of the subunit test streaming
1165 (define-public python2-subunit
1166 (package-with-python2 python-subunit))
1168 ;; Fixtures requires python-pbr at runtime, but pbr uses fixtures for its
1169 ;; own tests. Hence this bootstrap variant.
1170 (define-public python-fixtures-bootstrap
1172 (name "python-fixtures-bootstrap")
1176 (uri (pypi-uri "fixtures" version))
1179 "1vxj29bzz3rd4pcy51d05wng9q9dh4jq6wx92yklsm7i6h1ddw7w"))))
1180 (build-system python-build-system)
1181 (arguments `(#:tests? #f))
1183 `(("python-pbr-minimal" ,python-pbr-minimal)
1184 ("python-six" ,python-six)))
1185 (home-page "https://launchpad.net/python-fixtures")
1186 (synopsis "Python test fixture library")
1188 "This package is only used for bootstrapping. Use the regular
1189 python-fixtures package instead.")
1190 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
1192 (define-public python2-fixtures-bootstrap
1193 (package-with-python2 python-fixtures-bootstrap))
1195 (define-public python-fixtures
1197 (inherit python-fixtures-bootstrap)
1198 (name "python-fixtures")
1201 (modify-phases %standard-phases
1204 (invoke "python" "-m" "testtools.run"
1205 "fixtures.test_suite"))))))
1207 ;; Fixtures uses pbr at runtime to check versions, etc.
1208 `(("python-pbr" ,python-pbr)
1209 ("python-six" ,python-six)))
1211 `(("python-mock" ,python-mock)
1212 ("python-testtools" ,python-testtools-bootstrap)))
1214 "Fixtures provides a way to create reusable state, useful when writing
1217 (define-public python2-fixtures
1218 (package-with-python2 python-fixtures))
1220 (define-public python-testrepository-bootstrap
1222 (name "python-testrepository-bootstrap")
1227 (uri (pypi-uri "testrepository" version))
1230 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
1231 (build-system python-build-system)
1232 (arguments '(#:tests? #f))
1234 `(("python-fixtures" ,python-fixtures-bootstrap)
1235 ("python-subunit" ,python-subunit-bootstrap)
1236 ("python-testtools" ,python-testtools-bootstrap)))
1238 `(("python-mimeparse" ,python-mimeparse)))
1239 (home-page "https://launchpad.net/testrepository")
1240 (synopsis "Database for Python test results")
1242 "Bootstrap package for python-testrepository. Don't use this.")
1243 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
1245 (define-public python2-testrepository-bootstrap
1246 (package-with-python2 python-testrepository-bootstrap))
1248 (define-public python-testrepository
1250 (inherit python-testrepository-bootstrap)
1251 (name "python-testrepository")
1253 ;; FIXME: Many tests are failing.
1256 `(("python-fixtures" ,python-fixtures)
1257 ("python-subunit" ,python-subunit)
1258 ("python-testtools" ,python-testtools)))
1260 `(("python-mimeparse" ,python-mimeparse)))
1261 (description "Testrepository provides a database of test results which can
1262 be used as part of a developer's workflow to check things such as what tests
1263 have failed since the last commit or what tests are currently failing.")))
1265 (define-public python2-testrepository
1266 (package-with-python2 python-testrepository))
1268 (define-public python-coverage
1270 (name "python-coverage")
1275 (uri (pypi-uri "coverage" version))
1278 "097l4s3ssxm1vncsn0nw3a1pbzah28773q36c1ab9wz01r04973s"))))
1279 (build-system python-build-system)
1281 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
1283 (home-page "http://nedbatchelder.com/code/coverage")
1284 (synopsis "Code coverage measurement for Python")
1286 "Coverage measures code coverage, typically during test execution. It
1287 uses the code analysis tools and tracing hooks provided in the Python standard
1288 library to determine which lines are executable, and which have been
1290 (license license:bsd-3)))
1292 (define-public python2-coverage
1293 (package-with-python2 python-coverage))
1295 (define-public python-cov-core
1297 (name "python-cov-core")
1302 (uri (pypi-uri "cov-core" version))
1305 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
1306 (build-system python-build-system)
1308 `(("python-coverage" ,python-coverage)))
1309 (home-page "https://github.com/schlamar/cov-core")
1310 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
1312 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
1313 and @code{nose2-cov}. It is useful for developing coverage plugins for these
1314 testing frameworks.")
1315 (license license:expat)))
1317 (define-public python2-cov-core
1318 (package-with-python2 python-cov-core))
1320 (define-public python-codecov
1322 (name "python-codecov")
1327 (uri (pypi-uri "codecov" version))
1330 "1217c0vqf7ii65635gvl27a5pfhv0r7zhrpdp9cx640hg73bgn4f"))))
1331 (build-system python-build-system)
1333 `(("python-unittest2" ,python-unittest2)))
1335 `(("python-coverage" ,python-coverage)
1336 ("python-requests" ,python-requests)))
1337 (home-page "http://github.com/codecov/codecov-python")
1338 (synopsis "Upload code coverage reports to @code{codecov.io}")
1340 "Codecov collects code coverage reports from code written in Python, Java,
1341 C/C++, R, and more, and uploads it to the @code{codecov.io} service.")
1342 (license license:asl2.0)))
1344 (define-public python-testpath
1346 (name "python-testpath")
1352 (url "https://github.com/jupyter/testpath")
1354 (file-name (git-file-name name version))
1357 "0r4iiizjql6ny1ln7ciw7rrbjadz1s9zrf2hl0xkgnh3ypd8936f"))))
1358 (build-system python-build-system)
1360 `(#:tests? #f ; this package does not even have a setup.py
1361 #:modules ((guix build python-build-system)
1364 #:imported-modules (,@%python-build-system-modules
1367 (modify-phases %standard-phases
1370 (lambda* (#:key inputs outputs #:allow-other-keys)
1371 (let* ((version (last
1372 (string-split (assoc-ref inputs "python") #\-)))
1373 (x.y (string-join (take (string-split version #\.) 2)
1376 (assoc-ref outputs "out")
1377 "/lib/python" x.y "/site-packages/testpath")))
1379 (copy-recursively "testpath" dir))
1381 (home-page "https://github.com/takluyver/testpath")
1382 (synopsis "Test utilities for code working with files and commands")
1384 "Testpath is a collection of utilities for Python code working with files
1385 and commands. It contains functions to check things on the file system, and
1386 tools for mocking system commands and recording calls to those.")
1387 (license license:expat)))
1389 (define-public python2-testpath
1390 (package-with-python2 python-testpath))
1392 (define-public python-testlib
1394 (name "python-testlib")
1399 (uri (pypi-uri "testlib" version ".zip"))
1401 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
1402 (build-system python-build-system)
1404 `(("unzip" ,unzip))) ; for unpacking the source
1405 (synopsis "Python micro test suite harness")
1406 (description "A micro unittest suite harness for Python.")
1407 (home-page "https://github.com/trentm/testlib")
1408 (license license:expat)))
1410 (define-public python2-testlib
1411 (package-with-python2 python-testlib))
1413 ;;; The software provided by this package was integrated into pytest 2.8.
1414 (define-public python-pytest-cache
1416 (name "python-pytest-cache")
1420 (uri (pypi-uri "pytest-cache" version))
1423 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
1424 (build-system python-build-system)
1426 `(("python-apipkg" ,python-apipkg)
1427 ("python-execnet" ,python-execnet)
1428 ("python-py" ,python-py)
1429 ("python-pytest" ,python-pytest)))
1430 (synopsis "Py.test plugin with mechanisms for caching across test runs")
1431 (description "The pytest-cache plugin provides tools to rerun failures from
1432 the last py.test invocation.")
1433 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
1434 (license license:expat)))
1436 (define-public python2-pytest-cache
1437 (package-with-python2 python-pytest-cache))
1439 (define-public python-pytest-localserver
1441 (name "python-pytest-localserver")
1445 (uri (pypi-uri "pytest-localserver" version))
1448 "1hpgpxrpfq5c731ndnsay2lc0y9nh2wy9fn1f83s3z8xkn82fm1s"))))
1449 (build-system python-build-system)
1452 (modify-phases %standard-phases
1455 (invoke "py.test" "-v"))))))
1457 `(("python-pytest" ,python-pytest)
1458 ("python-requests" ,python-requests)
1459 ("python-six" ,python-six)))
1461 `(("python-werkzeug" ,python-werkzeug)))
1462 (synopsis "Py.test plugin to test server connections locally")
1463 (description "Pytest-localserver is a plugin for the pytest testing
1464 framework which enables you to test server connections locally.")
1465 (home-page "https://pypi.python.org/pypi/pytest-localserver")
1466 (license license:expat)))
1468 (define-public python-pytest-xprocess
1470 (name "python-pytest-xprocess")
1474 (uri (pypi-uri "pytest-xprocess" version))
1477 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
1478 (build-system python-build-system)
1480 `(("python-pytest" ,python-pytest)
1481 ("python-pytest-cache" ,python-pytest-cache)
1482 ("python-psutil" ,python-psutil)))
1483 (synopsis "Pytest plugin to manage external processes across test runs")
1484 (description "Pytest-xprocess is an experimental py.test plugin for managing
1485 processes across test runs.")
1486 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
1487 (license license:expat)))
1489 (define-public python-pytest-subtesthack
1491 (name "python-pytest-subtesthack")
1495 (uri (pypi-uri "pytest-subtesthack" version))
1498 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
1499 (build-system python-build-system)
1501 `(("python-pytest" ,python-pytest)))
1502 (synopsis "Set-up and tear-down fixtures for unit tests")
1503 (description "This plugin allows you to set up and tear down fixtures within
1504 unit test functions that use @code{py.test}. This is useful for using
1505 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
1506 function multiple times, without setting up or tearing down fixture state as is
1507 normally the case.")
1508 (home-page "https://github.com/untitaker/pytest-subtesthack/")
1509 (license license:unlicense)))
1511 (define-public python2-pytest-subtesthack
1512 (package-with-python2 python-pytest-subtesthack))
1514 (define-public python-pytest-sugar
1516 (name "python-pytest-sugar")
1521 (uri (pypi-uri "pytest-sugar" version))
1524 "1asq7yc4g8bx2sn7yy974mhc9ywvaihasjab4inkirdwn9s7mn7w"))))
1525 (build-system python-build-system)
1527 `(("python-packaging" ,python-packaging)
1528 ("python-pytest" ,python-pytest)
1529 ("python-termcolor" ,python-termcolor)))
1530 (home-page "https://pivotfinland.com/pytest-sugar/")
1531 (synopsis "Plugin for pytest that changes the default look and feel")
1533 "@code{pytest-sugar} is a plugin for py.test that changes the default
1534 look and feel of py.test, using a progress bar and showing failures and errors
1536 (license license:bsd-3)))
1538 (define-public python-hypothesis
1540 (name "python-hypothesis")
1544 (uri (pypi-uri "hypothesis" version))
1547 "1rshs1japfmwgar98yrkq4hg4z2q76hlnq7w2n3lfbjnscn1jd9b"))))
1548 (build-system python-build-system)
1550 `(;; FIXME: Change to python-flake8 in the next rebuild cycle.
1551 ("python-flake8" ,python-flake8-3.5)
1552 ("python-pytest" ,python-pytest-bootstrap)))
1554 `(("python-attrs" ,python-attrs-bootstrap)
1555 ("python-coverage" ,python-coverage)))
1556 (synopsis "Library for property based testing")
1557 (description "Hypothesis is a library for testing your Python code against a
1558 much larger range of examples than you would ever want to write by hand. It’s
1559 based on the Haskell library, Quickcheck, and is designed to integrate
1560 seamlessly into your existing Python unit testing work flow.")
1561 (home-page "https://github.com/HypothesisWorks/hypothesis-python")
1562 (license license:mpl2.0)
1563 (properties `((python2-variant . ,(delay python2-hypothesis))))))
1565 (define-public python2-hypothesis
1566 (let ((hypothesis (package-with-python2
1567 (strip-python2-variant python-hypothesis))))
1568 (package (inherit hypothesis)
1570 `(("python2-enum34" ,python2-enum34)
1571 ,@(package-propagated-inputs hypothesis))))))
1573 (define-public python-lit
1580 (uri (pypi-uri "lit" version))
1583 "0z651m3vkbk85y41larnsjxrszkbi58x9gzml3lb6ga7qwcrsg97"))))
1584 (build-system python-build-system)
1587 (modify-phases %standard-phases
1590 (invoke "python" "lit.py" "tests"))))))
1593 (home-page "https://llvm.org/")
1594 (synopsis "LLVM Software Testing Tool")
1595 (description "@code{lit} is a portable tool for executing LLVM and Clang
1596 style test suites, summarizing their results, and providing indication of
1598 (license license:ncsa)))
1600 (define-public python2-lit
1601 (package-with-python2 python-lit))
1603 (define-public python-pytest-pep8
1605 (name "python-pytest-pep8")
1609 (uri (pypi-uri "pytest-pep8" version))
1612 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
1613 (build-system python-build-system)
1615 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
1617 `(("python-pytest" ,python-pytest)))
1619 `(("python-pep8" ,python-pep8)))
1620 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
1621 (synopsis "Py.test plugin to check PEP8 requirements")
1622 (description "Pytest plugin for checking PEP8 compliance.")
1623 (license license:expat)))
1625 (define-public python2-pytest-pep8
1626 (package-with-python2 python-pytest-pep8))
1628 (define-public python-pytest-flakes
1630 (name "python-pytest-flakes")
1634 (uri (pypi-uri "pytest-flakes" version))
1637 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
1638 (build-system python-build-system)
1641 (modify-phases %standard-phases
1643 (add-after 'install 'check
1644 (lambda* (#:key outputs inputs #:allow-other-keys)
1645 ;; It's easier to run tests after install.
1646 ;; Make installed package available for running the tests
1647 (add-installed-pythonpath inputs outputs)
1648 (invoke "py.test" "-vv"))))))
1650 `(("python-coverage" ,python-coverage)
1651 ("python-pytest" ,python-pytest)
1652 ("python-pytest-cache" ,python-pytest-cache)
1653 ("python-pytest-pep8" ,python-pytest-pep8)))
1655 `(("python-pyflakes" ,python-pyflakes)))
1656 (home-page "https://github.com/fschulze/pytest-flakes")
1657 (synopsis "Py.test plugin to check source code with pyflakes")
1658 (description "Pytest plugin for checking Python source code with pyflakes.")
1659 (license license:expat)))
1661 (define-public python2-pytest-flakes
1662 (package-with-python2 python-pytest-flakes))
1664 (define-public python2-coverage-test-runner
1666 (name "python2-coverage-test-runner")
1672 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
1673 "coverage-test-runner/snapshot/coverage-test-runner-"
1677 "1kjjb9llckycnfxag8zcvqsn4z1s3dwyw6b1n0avxydihgf30rny"))))
1678 (build-system python-build-system)
1680 `(#:python ,python-2
1682 (modify-phases %standard-phases
1685 (invoke "./testrun"))))))
1687 `(("python2-coverage" ,python2-coverage)))
1688 (home-page "https://liw.fi/coverage-test-runner/")
1689 (synopsis "Python module for running unit tests")
1690 (description "@code{CoverageTestRunner} is a python module for running
1691 unit tests and failing them if the unit test module does not exercise all
1692 statements in the module it tests.")
1693 (license license:gpl3+)))
1695 (define-public python-pylint
1697 (name "python-pylint")
1703 "https://github.com/PyCQA/pylint/archive/pylint-"
1707 "0mzn1czhf1mgr2wiqfihb274sja02h899b85kywdpivppa9nwrmp"))))
1708 (build-system python-build-system)
1710 `(("python-pytest" ,python-pytest)
1711 ("python-pytest-runner" ,python-pytest-runner)
1712 ("python-tox" ,python-tox)))
1714 `(("python-astroid" ,python-astroid)
1715 ("python-isort" ,python-isort)
1716 ("python-mccabe" ,python-mccabe)
1717 ("python-six" ,python-six)))
1720 (modify-phases %standard-phases
1723 ;; Somehow, tests for python2-pylint
1724 ;; fail if run from the build directory
1725 (let ((work "/tmp/work"))
1727 (setenv "PYTHONPATH"
1728 (string-append (getenv "PYTHONPATH") ":" work))
1729 (copy-recursively "." work)
1730 (with-directory-excursion "/tmp"
1731 (invoke "python" "-m" "unittest" "discover"
1732 "-s" (string-append work "/pylint/test")
1733 "-p" "*test_*.py"))))))))
1734 (home-page "https://github.com/PyCQA/pylint")
1735 (synopsis "Python source code analyzer which looks for coding standard
1737 (description "Pylint is a Python source code analyzer which looks
1738 for programming errors, helps enforcing a coding standard and sniffs
1739 for some code smells (as defined in Martin Fowler's Refactoring book).
1741 Pylint has many rules enabled by default, way too much to silence them
1742 all on a minimally sized program. It's highly configurable and handle
1743 pragmas to control it from within your code. Additionally, it is
1744 possible to write plugins to add your own checks.")
1745 (properties `((python2-variant . ,(delay python2-pylint))))
1746 (license license:gpl2+)))
1748 (define-public python2-pylint
1749 (let ((pylint (package-with-python2
1750 (strip-python2-variant python-pylint))))
1751 (package (inherit pylint)
1753 `(("python2-backports-functools-lru-cache"
1754 ,python2-backports-functools-lru-cache)
1755 ("python2-configparser" ,python2-configparser)
1756 ,@(package-propagated-inputs pylint))))))
1758 (define-public python-paramunittest
1760 (name "python-paramunittest")
1765 (uri (pypi-uri "ParamUnittest" version))
1768 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
1769 (build-system python-build-system)
1771 "https://github.com/rik0/ParamUnittest")
1773 "Simple extension to have parametrized unit tests")
1775 "This package allows to create parametrized unit-tests that work with the standard
1776 unittest package. A parametrized test case is automatically converted to multiple test
1777 cases. Since they are TestCase subclasses, they work with other test suites that
1778 recognize TestCases.")
1779 (license license:bsd-2)))
1781 (define-public python2-python-paramunittest
1782 (package-with-python2 python-paramunittest))
1784 (define-public python-pytest-warnings
1786 (name "python-pytest-warnings")
1791 (uri (pypi-uri "pytest-warnings" version))
1794 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
1795 (build-system python-build-system)
1797 `(("pytest" ,python-pytest)))
1798 (home-page "https://github.com/fschulze/pytest-warnings")
1799 (synopsis "Pytest plugin to list Python warnings in pytest report")
1801 "Python-pytest-warnings is a pytest plugin to list Python warnings in
1803 (license license:expat)
1804 (properties `((python2-variant . ,(delay python2-pytest-warnings))
1805 ;; This package is part of pytest as of version 3.1.0.
1806 (superseded . ,python-pytest)))))
1808 (define-public python2-pytest-warnings
1809 (package (inherit (package-with-python2
1810 (strip-python2-variant python-pytest-warnings)))
1811 (properties `((superseded . ,python2-pytest)))))
1813 (define-public python-pytest-capturelog
1815 (name "python-pytest-capturelog")
1820 (uri (pypi-uri "pytest-capturelog" version ".tar.gz"))
1823 "038049nyjl7di59ycnxvc9nydivc5m8np3hqq84j2iirkccdbs5n"))))
1824 (build-system python-build-system)
1826 `(("pytest" ,python-pytest)))
1827 (home-page "https://bitbucket.org/memedough/pytest-capturelog/overview")
1828 (synopsis "Pytest plugin to catch log messages")
1830 "Python-pytest-catchlog is a pytest plugin to catch log messages.")
1831 (license license:expat)))
1833 (define-public python2-pytest-capturelog
1834 (package-with-python2 python-pytest-capturelog))
1836 (define-public python-pytest-catchlog
1838 (name "python-pytest-catchlog")
1843 (uri (pypi-uri "pytest-catchlog" version ".zip"))
1846 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
1847 (build-system python-build-system)
1849 `(("unzip" ,unzip)))
1851 `(("pytest" ,python-pytest)))
1852 (home-page "https://github.com/eisensheng/pytest-catchlog")
1853 (synopsis "Pytest plugin to catch log messages")
1855 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
1856 a fork of pytest-capturelog.")
1857 (license license:expat)))
1859 (define-public python2-pytest-catchlog
1860 (package-with-python2 python-pytest-catchlog))
1862 (define-public python-nosexcover
1864 (name "python-nosexcover")
1868 (uri (pypi-uri "nosexcover" version))
1871 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
1872 (build-system python-build-system)
1874 `(("python-coverage" ,python-coverage)
1875 ("python-nose" ,python-nose)))
1876 (home-page "http://github.com/cmheisel/nose-xcover")
1877 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
1878 (description "Nose-xcover is a companion to the built-in
1879 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
1880 to a file named coverage.xml.
1882 It will honor all the options you pass to the Nose coverage plugin,
1883 especially -cover-package.")
1884 (license license:expat)))
1886 (define-public python2-nosexcover
1887 (package-with-python2 python-nosexcover))
1889 (define-public python-discover
1891 (name "python-discover")
1896 (uri (pypi-uri "discover" version))
1899 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
1900 (build-system python-build-system)
1901 (home-page "http://pypi.python.org/pypi/discover/")
1903 "Python test discovery for unittest")
1905 "Discover provides test discovery for unittest, a feature that has been
1906 backported from Python 2.7 for Python 2.4+.")
1907 (license license:bsd-3)))
1909 (define-public python2-discover
1910 (package-with-python2 python-discover))
1912 (define-public behave
1918 (uri (pypi-uri "behave" version))
1921 "11hsz365qglvpp1m1w16239c3kiw15lw7adha49lqaakm8kj6rmr"))))
1922 (build-system python-build-system)
1924 `(("python-mock" ,python-mock)
1925 ("python-nose" ,python-nose)
1926 ("python-pathpy" ,python-pathpy)
1927 ("python-pyhamcrest" ,python-pyhamcrest)
1928 ("python-pytest" ,python-pytest)))
1930 `(("python-six" ,python-six)
1931 ("python-parse" ,python-parse)
1932 ("python-parse-type" ,python-parse-type)))
1934 '(#:test-target "behave_test"))
1935 (home-page "https://github.com/behave/behave")
1936 (synopsis "Python behavior-driven development")
1938 "Behave is a tool for behavior-driven development in python.
1939 Behavior-driven development (or BDD) is an agile software development
1940 technique that encourages collaboration between developers, QA and
1941 non-technical or business participants in a software project. Behave uses
1942 tests written in a natural language style, backed up by Python code.")
1943 (license license:x11)))
1945 (define-public python-behave-web-api
1947 (name "python-behave-web-api")
1952 (uri (pypi-uri "behave-web-api" version))
1955 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
1956 (build-system python-build-system)
1959 (modify-phases %standard-phases
1960 (add-after 'unpack 'fix-dependencies
1962 (substitute* "setup.py"
1963 (("'wheel'") "") ; We don't use it.
1964 (("'ordereddict==1.1'") "")) ; Python >= 2.7 has it built-in.
1967 `(("behave" ,behave)
1968 ("python-requests" ,python-requests)))
1969 (home-page "https://github.com/jefersondaniel/behave-web-api")
1970 (synopsis "Provides testing for JSON APIs with Behave for Python")
1971 (description "This package provides testing utility modules for testing
1972 JSON APIs with Behave.")
1973 (license license:expat)))
1975 (define-public python2-behave-web-api
1976 (package-with-python2 python-behave-web-api))
1978 (define-public python-rednose
1980 (name "python-rednose")
1985 (uri (pypi-uri "rednose" version))
1988 "11x5nx5b4wdq04s7vj1gcdl07jvvkfb37p0r5lg773gr5rr8mj6h"))))
1989 (build-system python-build-system)
1991 `(#:phases (modify-phases %standard-phases
1992 (add-after 'unpack 'patch-setup.py
1994 ;; Six is only required for tests and later versions
1996 (substitute* "setup.py"
1997 (("six==1.10.0") "six"))
2000 `(("python-colorama" ,python-colorama)
2001 ("python-termstyle" ,python-termstyle)))
2003 `(("python-six" ,python-six)
2004 ("python-nose" ,python-nose)))
2005 (home-page "https://github.com/JBKahn/rednose")
2006 (synopsis "Colored output for Python nosetests")
2007 (description "This package provides colored output for the
2008 @command{nosetests} command of the Python Nose unit test framework.")
2009 (license license:bsd-3)))
2011 (define-public python2-rednose
2012 (package-with-python2 python-rednose))
2014 (define-public python-nose-randomly
2016 (name "python-nose-randomly")
2021 (uri (pypi-uri "nose-randomly" version))
2023 (base32 "0z662rqhfk4bjmg806mn4frb8nz4gbh7mrddsrhfffp1g4yklj3y"))))
2024 (build-system python-build-system)
2026 `(("python-nose" ,python-nose)
2027 ("python-numpy" ,python-numpy)))
2028 (home-page "https://github.com/adamchainz/nose-randomly")
2030 "Nose plugin to randomly order tests and control random.seed")
2032 "This is a @code{Nose} plugin to randomly order tests which can be quite
2033 powerful in discovering hidden flaws in the tests themselves, while helping to
2034 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
2035 by resetting it to a repeatable number for each test, enabling the tests to
2036 create data based on random numbers and yet remain repeatable.")
2037 (license license:bsd-3)))
2039 (define-public python2-nose-randomly
2040 (package-with-python2 python-nose-randomly))
2042 (define-public python-nose-timer
2044 (name "python-nose-timer")
2049 (uri (pypi-uri "nose-timer" version))
2051 (base32 "05wzkc88vbzw62pqkvhl33211b90kns0lny70b7qw62rcg4flzk4"))))
2052 (build-system python-build-system)
2054 `(("python-nose" ,python-nose)
2055 ("python-termcolor" ,python-termcolor)))
2056 (home-page "https://github.com/mahmoudimus/nose-timer")
2057 (synopsis "Timer plugin for nosetests")
2058 (description "Shows how much time was needed to run individual tests.")
2059 (license license:expat)))
2061 (define-public python2-nose-timer
2062 (package-with-python2 python-nose-timer))
2064 (define-public python-freezegun
2066 (name "python-freezegun")
2071 (uri (pypi-uri "freezegun" version))
2073 (base32 "1rx57v8ryjncjimg8hys9kx1r3rknvwcl4y340g20jn0sf69qk9a"))))
2074 (build-system python-build-system)
2076 `(("python-mock" ,python-mock)
2077 ("python-pytest" ,python-pytest)))
2079 `(("python-six" ,python-six)
2080 ("python-dateutil" ,python-dateutil)))
2083 (modify-phases %standard-phases
2084 ;; The tests are normally executed via `make test`, but the PyPi
2085 ;; package does not include the Makefile.
2088 (invoke "pytest" "-vv"))))))
2089 (home-page "https://github.com/spulec/freezegun")
2090 (synopsis "Test utility for mocking the datetime module")
2092 "FreezeGun is a library that allows your python tests to travel through
2093 time by mocking the datetime module.")
2094 (license license:asl2.0)))
2096 (define-public python2-freezegun
2097 (package-with-python2 python-freezegun))
2099 (define-public python-flexmock
2101 (name "python-flexmock")
2105 (uri (pypi-uri "flexmock" version))
2108 "0b6qw3grhgx58kxlkj7mdma7xdvlj02zabvcf7w2qifnfjwwwcsh"))))
2109 (build-system python-build-system)
2110 (home-page "https://flexmock.readthedocs.org")
2111 (synopsis "Testing library for Python")
2113 "flexmock is a testing library for Python that makes it easy to create
2114 mocks, stubs and fakes.")
2115 (license license:bsd-3)))
2117 (define-public python2-flexmock
2118 (package-with-python2 python-flexmock))
2120 (define-public python-flaky
2122 (name "python-flaky")
2126 (uri (pypi-uri "flaky" version))
2129 "1nm1kjf857z5aw7v642ffsy1vwf255c6wjvmil71kckjyd0mxg8j"))))
2130 (build-system python-build-system)
2132 ;; TODO: Tests require 'coveralls' and 'genty' which are not in Guix yet.
2134 (home-page "https://github.com/box/flaky")
2135 (synopsis "Automatically rerun flaky tests")
2137 "Flaky is a plugin for @code{nose} or @code{py.test} that automatically
2140 Ideally, tests reliably pass or fail, but sometimes test fixtures must rely
2141 on components that aren't 100% reliable. With flaky, instead of removing
2142 those tests or marking them to @code{@@skip}, they can be automatically
2144 (license license:asl2.0)))
2146 (define-public python2-flaky
2147 (package-with-python2 python-flaky))
2149 (define-public python-pyhamcrest
2151 (name "python-pyhamcrest")
2154 ;; Tests not distributed from pypi release.
2157 (url "https://github.com/hamcrest/PyHamcrest")
2158 (commit (string-append "V" version))))
2159 (file-name (git-file-name name version))
2162 "01qnzj9qnzz0y78qa3ing24ssvszb0adw59xc4qqmdn5wryy606b"))))
2163 (native-inputs ; All native inputs are for tests
2164 `(("python-pytest-cov" ,python-pytest-cov)
2165 ("python-mock" ,python-mock)
2166 ("python-pytest" ,python-pytest)
2167 ("python-hypothesis" ,python-hypothesis)))
2169 `(("python-six" ,python-six)))
2170 (build-system python-build-system)
2171 (home-page "http://hamcrest.org/")
2172 (synopsis "Hamcrest matchers for Python")
2174 "PyHamcrest is a framework for writing matcher objects,
2175 allowing you to declaratively define \"match\" rules.")
2176 (license license:bsd-3)))
2178 (define-public python2-pyhamcrest
2179 (package-with-python2 python-pyhamcrest))
2181 (define-public unittest-cpp
2183 (name "unittest-cpp")
2188 (url "https://github.com/unittest-cpp/unittest-cpp")
2189 (commit (string-append "v" version))))
2190 (file-name (git-file-name name version))
2192 (base32 "0sxb3835nly1jxn071f59fwbdzmqi74j040r81fanxyw3s1azw0i"))))
2194 `(#:tests? #f)) ; It's run after build automatically.
2195 (build-system cmake-build-system)
2196 (home-page "https://github.com/unittest-cpp/unittest-cpp")
2197 (synopsis "Lightweight unit testing framework for C++")
2198 (description "UnitTest++ is a lightweight unit testing framework for C++.
2199 It was designed to do test-driven development on a wide variety of platforms.
2200 Simplicity, portability, speed, and small footprint are all very important
2201 aspects of UnitTest++. UnitTest++ is mostly standard C++ and makes minimal use
2202 of advanced library and language features, which means it should be easily
2203 portable to just about any platform.")
2204 (license license:expat)))
2206 (define-public libfaketime
2208 (name "libfaketime")
2210 (home-page "https://github.com/wolfcw/libfaketime")
2215 (commit (string-append "v" version))))
2218 "1cin1pqwpsswcv7amiwijirvcg3x1zf2l00s1x84nxc5602fzr5c"))
2219 (file-name (git-file-name name version))))
2220 (build-system gnu-build-system)
2222 '(#:phases (modify-phases %standard-phases
2224 (lambda* (#:key outputs #:allow-other-keys)
2225 (let ((out (assoc-ref outputs "out")))
2227 (setenv "PREFIX" out)
2229 (add-before 'check 'pre-check
2231 (substitute* "test/functests/test_exclude_mono.sh"
2232 (("/bin/bash") (which "bash")))
2234 #:test-target "test"))
2236 `(("perl" ,perl))) ;for tests
2237 (synopsis "Fake the system time for single applications")
2239 "The libfaketime library allows users to modify the system time that an
2240 application \"sees\". It is meant to be loaded using the dynamic linker's
2241 @code{LD_PRELOAD} environment variable. The @command{faketime} command
2242 provides a simple way to achieve this.")
2243 (license license:gpl2)))
2245 (define-public umockdev
2251 (uri (string-append "https://github.com/martinpitt/umockdev/"
2252 "releases/download/" version "/"
2253 "umockdev-" version ".tar.xz"))
2256 "1hx5jm9afng6hw9wyp524z8nwdp6w053pca0w2c0gqpgrmvjxvd2"))))
2257 (build-system gnu-build-system)
2260 (modify-phases %standard-phases
2261 (add-after 'unpack 'skip-broken-test
2263 (substitute* "tests/test-umockdev.c"
2264 (("/\\* sys/ in other dir")
2265 (string-append "return; // ")))
2269 ("python" ,python) ; for tests
2270 ("which" ,which) ; for tests
2271 ("gtk-doc" ,gtk-doc)
2272 ("pkg-config" ,pkg-config)))
2276 ("libgudev" ,libgudev)
2277 ("gobject-introspection" ,gobject-introspection)))
2278 (home-page "https://github.com/martinpitt/umockdev/")
2279 (synopsis "Mock hardware devices for creating unit tests")
2280 (description "umockdev mocks hardware devices for creating integration
2281 tests for hardware related libraries and programs. It also provides tools to
2282 record the properties and behaviour of particular devices, and to run a
2283 program or test suite under a test bed with the previously recorded devices
2285 (license license:lgpl2.1+)))
2287 (define-public python-pyfakefs
2289 (name "python-pyfakefs")
2293 ;; We use the PyPI URL because there is no proper release
2294 ;; available from GitHub. The GitHub project only provides
2295 ;; autogenerated tarballs, which are known to change in place.
2296 (uri (pypi-uri "pyfakefs" version))
2299 "0qb9jp0bqhc0dv0rn805fv99029fvx135f3bvka6scfkcl6jgllc"))
2300 (patches (search-patches
2301 "python-pyfakefs-remove-bad-test.patch"))
2302 (file-name (string-append name "-" version ".tar.gz"))))
2305 (modify-phases %standard-phases
2306 ;; The default test suite does not run these extra tests.
2307 (add-after 'check 'check-pytest-plugin
2310 "python" "-m" "pytest"
2311 "pyfakefs/pytest_tests/pytest_plugin_test.py")
2314 `(("python-pytest" ,python-pytest)))
2315 (build-system python-build-system)
2316 ;; Guix lint doesn't like that this is a permanent redirect to the GitHub
2317 ;; page, but the pyfakefs documentation asks us to use this specific URL
2318 ;; when linking to the project. Honor their request.
2319 (home-page "http://pyfakefs.org/")
2320 ;; TRANSLATORS: In the synopsis, "Mock" is a verb.
2321 (synopsis "Mock file system interactions in tests")
2323 "This package provides a Python library intended for use in automated
2324 tests. One difficulty when testing software is that the code under test might
2325 need to read or write to files in the local file system. If the file system
2326 is not set up in just the right way, it might cause a spurious error during
2327 the test. The pyfakefs library provides a solution to problems like this by
2328 mocking file system interactions. In other words, it arranges for the code
2329 under test to interact with a fake file system instead of the real file
2330 system. The code under test requires no modification to work with pyfakefs.")
2331 (license license:asl2.0)))
2333 (define-public python2-pyfakefs
2334 (package-with-python2 python-pyfakefs))