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 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 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 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 Kei Kebreau <kkebreau@posteo.net>
26 ;;; Copyright © 2017 ng0 <ng0@infotropique.org>
27 ;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
28 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
29 ;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
30 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
32 ;;; This file is part of GNU Guix.
34 ;;; GNU Guix is free software; you can redistribute it and/or modify it
35 ;;; under the terms of the GNU General Public License as published by
36 ;;; the Free Software Foundation; either version 3 of the License, or (at
37 ;;; your option) any later version.
39 ;;; GNU Guix is distributed in the hope that it will be useful, but
40 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
41 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42 ;;; GNU General Public License for more details.
44 ;;; You should have received a copy of the GNU General Public License
45 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
47 (define-module (gnu packages check)
48 #:use-module (gnu packages)
49 #:use-module (gnu packages autotools)
50 #:use-module (gnu packages bash)
51 #:use-module (gnu packages compression)
52 #:use-module (gnu packages llvm)
53 #:use-module (gnu packages python)
54 #:use-module (gnu packages python-web)
55 #:use-module (gnu packages time)
56 #:use-module (guix utils)
57 #:use-module ((guix licenses) #:prefix license:)
58 #:use-module (guix packages)
59 #:use-module (guix download)
60 #:use-module (guix git-download)
61 #:use-module (guix build-system cmake)
62 #:use-module (guix build-system gnu)
63 #:use-module (guix build-system python)
64 #:use-module (guix build-system trivial))
73 (uri (string-append "https://github.com/libcheck/check/releases/download/"
74 version "/check-" version ".tar.gz"))
77 "0d22h8xshmbpl9hba9ch3xj8vb9ybm5akpsbbh7yj07fic4h2hj6"))))
78 (build-system gnu-build-system)
79 (home-page "https://libcheck.github.io/check/")
80 (synopsis "Unit test framework for C")
82 "Check is a unit testing framework for C. It features a simple
83 interface for defining unit tests, putting little in the way of the
84 developer. Tests are run in a separate address space, so Check can
85 catch both assertion failures and code errors that cause segmentation
86 faults or other signals. The output from unit tests can be used within
87 source code editors and IDEs.")
88 (license license:lgpl2.1+)))
97 (uri (string-append "mirror://sourceforge/cunit/CUnit/"
98 version "/CUnit-" version ".tar.bz2"))
101 "057j82da9vv4li4z5ri3227ybd18nzyq81f6gsvhifs5z0vr3cpm"))))
102 (build-system gnu-build-system)
103 (arguments '(#:phases
104 (modify-phases %standard-phases
105 (add-before 'configure 'autoconf
107 (zero? (system* "autoreconf" "-vfi")))))))
109 `(("automake" ,automake)
110 ("autoconf" ,autoconf)
111 ("libtool" ,libtool)))
112 (home-page "http://cunit.sourceforge.net/")
113 (synopsis "Automated testing framework for C")
115 "CUnit is a lightweight system for writing, administering, and running
116 unit tests in C. It provides C programmers with basic testing functionality
117 with a flexible variety of user interfaces.")
118 (license license:gpl2+)))
120 (define-public cppunit
126 (uri (string-append "http://dev-www.libreoffice.org/src/"
127 name "-" version ".tar.gz"))
130 "17s2kzmkw3kfjhpp72rfppyd7syr7bdq5s69syj2nvrlwd3d4irz"))))
131 ;; Explicitly link with libdl. This is expected to be done by packages
132 ;; relying on cppunit for their tests. However, not all of them do.
133 ;; If we added the linker flag to such packages, we would pollute all
134 ;; binaries, not only those used for testing.
136 `(#:make-flags '("LDFLAGS=-ldl")))
137 (build-system gnu-build-system)
138 (home-page "https://wiki.freedesktop.org/www/Software/cppunit/")
139 (synopsis "Unit testing framework for C++")
140 (description "CppUnit is the C++ port of the famous JUnit framework for
141 unit testing. Test output is in XML for automatic testing and GUI based for
143 (license license:lgpl2.1))) ; no copyright notices. LGPL2.1 is in the tarball
145 (define-public catch-framework
148 (version "1.3.5") ;Sub-minor is the build number
152 (url "https://github.com/philsquared/Catch")
154 (commit "ae5ee2cf63d6d67bd1369b512d2a7b60b571c907")))
155 (file-name (string-append name "-" version))
158 "1yfb3lxv929szqy1nw9xw3d45wzkppziqshkjxvrb1fdmf46x564"))))
159 (build-system trivial-build-system)
161 `(#:modules ((guix build utils))
163 (use-modules (guix build utils))
164 (let* ((source (assoc-ref %build-inputs "source"))
165 (output (assoc-ref %outputs "out"))
166 (incdir (string-append output "/include"))
167 (docdir (string-append output "/share/doc/catch-"
170 (for-each mkdir-p (list incdir docdir))
171 (install-file (string-append source
172 "/single_include/catch.hpp")
174 (copy-recursively (string-append source "/docs")
176 (home-page "http://catch-lib.net/")
177 (synopsis "Automated test framework for C++ and Objective-C")
179 "Catch stands for C++ Automated Test Cases in Headers and is a
180 multi-paradigm automated test framework for C++ and Objective-C.")
181 (license license:boost1.0)))
183 (define-public cmdtest
189 (uri (string-append "http://git.liw.fi/cmdtest/snapshot/"
190 name "-" version ".tar.gz"))
193 "1i6gi4yp4qqx1liax098c7nwdb24pghh11xqlrcs7lnhh079rqhb"))))
194 (build-system python-build-system)
198 (modify-phases %standard-phases
199 ;; check phase needs to be run before the build phase. If not, the
200 ;; coverage test runner looks for tests for the built source files,
203 (add-before 'build 'check
206 (("/bin/sh") (which "sh")))
207 ;; yarn uses python2-ttystatus to print messages.
208 ;; python2-ttystatus requires /dev/tty which is not present in
209 ;; the build environment. Hence assuming-failure test fails.
210 (delete-file "yarn.tests/assuming-failure.script")
211 (delete-file "yarn.tests/assuming-failure.stdout")
212 (zero? (system* "python" "setup.py" "check")))))))
214 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)))
216 `(("python2-cliapp" ,python2-cliapp)
217 ("python2-markdown" ,python2-markdown)
218 ("python2-ttystatus" ,python2-ttystatus)))
219 (home-page "https://liw.fi/cmdtest/")
220 (synopsis "Black box Unix program tester")
222 "@code{cmdtest} black box tests Unix command line tools. Roughly, it is
223 given a command line and input files, and the expected output, and it verifies
224 that the command line produces the expected output. If not, it reports a
225 problem, and shows the differences.")
226 (license license:gpl3+)))
228 (define-public cmocka
234 (uri (string-append "https://cmocka.org/files/"
235 (version-major+minor version) "/cmocka-"
239 "1283zi9qf5613g8iadm1fxmjh4rzxqd5np2j3lcpgairf25g8bph"))))
240 (build-system cmake-build-system)
242 `(#:tests? #f)) ; No test target
243 (home-page "https://cmocka.org/")
244 (synopsis "Unit testing framework for C")
245 (description "Cmocka is a unit testing framework for C with support for
246 mock objects. It only requires the standard C library, and works with
247 different compilers. Cmocka supports several different message output formats
248 like Test Anything Protocol, Subunit, xUnit XML or the original cmockery output
250 (license license:asl2.0)))
252 (define-public cppcheck
258 (uri (string-append "https://github.com/danmar/cppcheck/archive/"
261 (base32 "0miamqk7pa2dzmnmi5wb6hjp2a3zya1x8afnlcxby8jb6gp6wf8j"))
262 (file-name (string-append name "-" version ".tar.gz"))))
263 (build-system cmake-build-system)
264 (home-page "http://cppcheck.sourceforge.net")
265 (synopsis "Static C/C++ code analyzer")
266 (description "Cppcheck is a static code analyzer for C and C++. Unlike
267 C/C++ compilers and many other analysis tools it does not detect syntax errors
268 in the code. Cppcheck primarily detects the types of bugs that the compilers
269 normally do not detect. The goal is to detect only real errors in the code
270 (i.e. have zero false positives).")
271 (license license:gpl3+)))
273 (define-public googletest
280 (uri (string-append "https://github.com/google/googletest/archive/"
281 "release-" version ".tar.gz"))
282 (file-name (string-append name "-" version ".tar.gz"))
285 "1n5p1m2m3fjrjdj752lf92f9wq3pl5cbsfrb49jqbg52ghkz99jq"))))
286 (build-system cmake-build-system)
288 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
290 `(("python-2" ,python-2)))
291 (home-page "https://github.com/google/googletest/")
292 (synopsis "Test discovery and XUnit test framework")
293 (description "Google Test features an XUnit test framework, automated test
294 discovery, death tests, assertions, parameterized tests and XML test report
296 (license license:bsd-3)))
298 (define-public cpputest
305 (uri (string-append "https://github.com/cpputest/cpputest/releases/download/v"
306 version "/cpputest-" version ".tar.gz"))
309 "0mk48xd3klyqi7wf3f4wn4zqxxzmvrhhl32r25jzrixzl72wq7f8"))))
310 (build-system gnu-build-system)
312 `(("googletest" ,googletest)))
313 (home-page "https://cpputest.github.io/")
314 (synopsis "Unit testing and mocking framework for C/C++")
316 "CppUTest is a C/C++ based unit xUnit test framework. It is written in
317 C++ but is used in C and C++ projects and frequently used in embedded systems
318 but it works for any C/C++ project.")
319 (license license:bsd-3)))
321 (define-public python-parameterized
323 (name "python-parameterized")
328 (uri (pypi-uri "parameterized" version))
331 "1qj1939shm48d9ql6fm1nrdy4p7sdyj8clz1szh5swwpf1qqxxfa"))))
332 (build-system python-build-system)
333 (arguments '(#:tests? #f)) ; there are no tests
334 (home-page "https://github.com/wolever/parameterized")
335 (synopsis "Parameterized testing with any Python test framework")
337 "Parameterized is a Python library that aims to fix parameterized testing
338 for every Python test framework. It supports nose, py.test, and unittest.")
339 (license license:bsd-2)))
341 (define-public python2-parameterized
342 (package-with-python2 python-parameterized))
344 (define-public python-mock
351 (uri (pypi-uri "mock" version))
354 "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
356 `(("python-pbr" ,python-pbr-minimal)
357 ("python-six" ,python-six)))
358 (build-system python-build-system)
360 `(("python-unittest2" ,python-unittest2)))
363 (modify-phases %standard-phases
366 (zero? (system* "unit2")))))))
367 (home-page "https://github.com/testing-cabal/mock")
368 (synopsis "Python mocking and patching library for testing")
370 "Mock is a library for testing in Python. It allows you to replace parts
371 of your system under test with mock objects and make assertions about how they
373 (properties `((python2-variant . ,(delay python2-mock))))
374 (license license:expat)))
376 (define-public python2-mock
377 (let ((base (package-with-python2
378 (strip-python2-variant python-mock))))
379 (package (inherit base)
381 `(("python2-functools32" ,python2-functools32)
382 ("python2-funcsigs" ,python2-funcsigs)
383 ,@(package-propagated-inputs base))))))
385 (define-public python-nose
392 (uri (pypi-uri "nose" version))
395 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
396 (build-system python-build-system)
398 '(#:tests? #f)) ; FIXME: test suite fails
399 (home-page "http://readthedocs.org/docs/nose/")
400 (synopsis "Python testing library")
402 "Nose extends the unittest library to make testing easier.")
403 (license license:lgpl2.0+)))
405 (define-public python2-nose
406 (package-with-python2 python-nose))
408 (define-public python-nose2
410 (name "python-nose2")
415 (uri (pypi-uri "nose2" version))
418 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
419 (build-system python-build-system)
420 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
422 `(("python-cov-core" ,python-cov-core)
423 ("python-pytest-cov" ,python-pytest-cov)
424 ("python-six" ,python-six)))
425 (home-page "https://github.com/nose-devs/nose2")
426 (synopsis "Next generation of nicer testing for Python")
428 "Nose2 is the next generation of nicer testing for Python, based on the
429 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
430 better plugin api, being easier for users to configure, and simplifying internal
431 interfaces and processes.")
432 (license license:bsd-2)))
434 (define-public python2-nose2
435 (package-with-python2 python-nose2))
437 (define-public python-unittest2
439 (name "python-unittest2")
444 (uri (pypi-uri "unittest2" version))
446 (search-patches "python-unittest2-python3-compat.patch"
447 "python-unittest2-remove-argparse.patch"))
450 "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212"))))
451 (build-system python-build-system)
454 (modify-phases %standard-phases
457 (zero? (system* "python" "-m" "unittest2" "discover" "--verbose")))))))
459 `(("python-six" ,python-six)
460 ("python-traceback2" ,python-traceback2)))
461 (home-page "http://pypi.python.org/pypi/unittest2")
462 (synopsis "Python unit testing library")
464 "Unittest2 is a replacement for the unittest module in the Python
466 (license license:psfl)))
468 (define-public python2-unittest2
469 (package-with-python2 python-unittest2))
471 (define-public python-pytest
473 (name "python-pytest")
478 (uri (pypi-uri "pytest" version))
481 "0g6w86ks73fnrnsyib9ii2rbyx830vn7aglsjqz9v1n2xwbndyi7"))))
482 (build-system python-build-system)
485 (modify-phases %standard-phases
486 (add-before 'check 'disable-invalid-tests
488 ;; Some tests involves the /usr directory, and fails.
489 (substitute* "testing/test_argcomplete.py"
490 (("def test_remove_dir_prefix\\(self\\):")
491 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):"))
492 (substitute* "testing/test_argcomplete.py"
493 (("def test_remove_dir_prefix" line)
494 (string-append "@pytest.mark.skip"
495 "(reason=\"Assumes that /usr exists.\")\n "
499 `(("python-py" ,python-py)))
501 `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
503 ("python-hypothesis" ,python-hypothesis)
504 ("python-nose" ,python-nose)
505 ("python-mock" ,python-mock)
506 ("python-setuptools-scm" ,python-setuptools-scm)))
507 (home-page "http://pytest.org")
508 (synopsis "Python testing library")
510 "Pytest is a testing tool that provides auto-discovery of test modules
511 and functions, detailed info on failing assert statements, modular fixtures,
512 and many external plugins.")
513 (license license:expat)))
515 (define-public python2-pytest
516 (package-with-python2 python-pytest))
518 (define-public python-pytest-bootstrap
520 (inherit python-pytest)
521 (name "python-pytest-bootstrap")
522 (native-inputs `(("python-setuptools-scm" ,python-setuptools-scm)))
523 (arguments `(#:tests? #f))))
525 (define-public python2-pytest-bootstrap
526 (package-with-python2 python-pytest-bootstrap))
528 (define-public python-pytest-cov
530 (name "python-pytest-cov")
535 (uri (pypi-uri "pytest-cov" version))
538 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
539 (build-system python-build-system)
542 (modify-phases %standard-phases
545 ;; options taken from tox.ini
546 ;; TODO: make "--restructuredtext" tests pass. They currently fail
547 ;; with "Duplicate implicit target name"
548 (zero? (system* "python" "./setup.py" "check"
549 "--strict" "--metadata")))))))
551 `(("python-coverage" ,python-coverage)
552 ("python-pytest" ,python-pytest)))
553 (home-page "https://github.com/pytest-dev/pytest-cov")
554 (synopsis "Pytest plugin for measuring coverage")
556 "Pytest-cov produces coverage reports. It supports centralised testing and
557 distributed testing in both @code{load} and @code{each} modes. It also
558 supports coverage of subprocesses.")
559 (license license:expat)))
561 (define-public python2-pytest-cov
562 (package-with-python2 python-pytest-cov))
564 (define-public python-pytest-runner
566 (name "python-pytest-runner")
571 (uri (pypi-uri "pytest-runner" version))
574 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
575 (build-system python-build-system)
578 (modify-phases %standard-phases
579 ;; The fancy way of setting the version with setuptools_scm does not
580 ;; seem to work here.
581 (add-after 'unpack 'set-version
583 (substitute* "docs/conf.py"
584 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
585 (string-append "version = \"" ,version "\"")))
588 `(("python-pytest" ,python-pytest-bootstrap)
589 ("python-setuptools-scm" ,python-setuptools-scm)))
590 (home-page "https://github.com/pytest-dev/pytest-runner")
591 (synopsis "Invoke py.test as a distutils command")
593 "This package provides a @command{pytest-runner} command that
594 @file{setup.py} files can use to run tests.")
595 (license license:expat)))
597 (define-public python2-pytest-runner
598 (package-with-python2 python-pytest-runner))
600 (define-public python-pytest-mock
602 (name "python-pytest-mock")
607 (uri (pypi-uri "pytest-mock" version ".zip"))
610 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
611 (build-system python-build-system)
615 `(("python-pytest" ,python-pytest)))
616 (home-page "https://github.com/pytest-dev/pytest-mock/")
617 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
619 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
620 around the patching API provided by the @code{mock} package, but with the
621 benefit of not having to worry about undoing patches at the end of a test.
622 The mocker fixture has the same API as @code{mock.patch}, supporting the
624 (properties `((python2-variant . ,(delay python2-pytest-mock))))
625 (license license:expat)))
627 (define-public python2-pytest-mock
628 (let ((base (package-with-python2
629 (strip-python2-variant python-pytest-mock))))
630 (package (inherit base)
632 `(("python2-mock" ,python2-mock)
633 ,@(package-propagated-inputs base))))))
635 (define-public python-pytest-xdist
637 (name "python-pytest-xdist")
642 (uri (pypi-uri "pytest-xdist" version ".zip"))
645 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
646 (modules '((guix build utils)))
649 ;; Remove pre-compiled .pyc files from source.
650 (for-each delete-file-recursively
651 (find-files "." "__pycache__" #:directories? #t))
652 (for-each delete-file (find-files "." "\\.pyc$"))
654 (build-system python-build-system)
656 '(#:tests? #f)) ;FIXME: Some tests are failing.
658 ;; (modify-phases %standard-phases
660 ;; (add-after 'install 'check
661 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
662 ;; (add-installed-pythonpath inputs outputs)
663 ;; (zero? (system* "py.test" "-v")))))
666 ("python-setuptools-scm" ,python-setuptools-scm)))
668 `(("python-execnet" ,python-execnet)
669 ("python-pytest" ,python-pytest)
670 ("python-py" ,python-py)))
672 "https://github.com/pytest-dev/pytest-xdist")
674 "Plugin for py.test with distributed testing and loop-on-failing modes")
676 "The pytest-xdist plugin extends py.test with some unique test execution
677 modes: parallelization, running tests in boxed subprocesses, the ability
678 to run tests repeatedly when failed, and the ability to run tests on multiple
679 Python interpreters or platforms. It uses rsync to copy the existing
680 program code to a remote location, executes there, and then syncs the
682 (license license:expat)))
684 (define-public python2-pytest-xdist
685 (package-with-python2 python-pytest-xdist))
687 (define-public python-scripttest
689 (name "python-scripttest")
695 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
699 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
700 (build-system python-build-system)
702 `(("python-pytest" ,python-pytest)))
703 (home-page "http://pythonpaste.org/scripttest/")
704 (synopsis "Python library to test command-line scripts")
705 (description "Scripttest is a Python helper library for testing
706 interactive command-line applications. With it you can run a script in a
707 subprocess and see the output as well as any file modifications.")
708 (license license:expat)))
710 (define-public python2-scripttest
711 (package-with-python2 python-scripttest))
713 (define-public python-testtools
715 (name "python-testtools")
720 (uri (pypi-uri "testtools" version))
723 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
724 (build-system python-build-system)
727 (modify-phases %standard-phases
728 (add-after 'unpack 'fix-module-imports
730 (substitute* "setup.py"
731 (("'unittest2>=0.8.0',") ""))
732 (substitute* '("testtools/testcase.py"
733 "testtools/testsuite.py"
735 "testtools/tests/test_run.py"
736 "testtools/tests/test_testsuite.py"
737 "testtools/tests/test_deferredruntest.py")
738 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
739 (("import unittest2 as unittest") "import unittest")
740 (("import unittest2") "import unittest as unittest2")
741 (("from unittest2 import") "from unittest import"))
742 (substitute* "testtools/tests/test_testresult.py"
743 ;; NUL in source code is not allowed (raises ValueError).
744 (("\\x00\\x04") "\\x04"))
747 `(("python-mimeparse" ,python-mimeparse)
748 ("python-extras" ,python-extras)))
749 (home-page "https://github.com/testing-cabal/testtools")
751 "Extensions to the Python standard library unit testing framework")
753 "Testtools extends the Python standard library unit testing framework to
754 provide matchers, more debugging information, and cross-Python
756 (license license:psfl)))
758 (define-public python2-testtools
759 (package-with-python2 python-testtools))
761 (define-public python-testscenarios
763 (name "python-testscenarios")
769 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
773 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
774 (build-system python-build-system)
776 `(("python-testtools" ,python-testtools)))
777 (home-page "https://launchpad.net/testscenarios")
778 (synopsis "Pyunit extension for dependency injection")
780 "Testscenarios provides clean dependency injection for Python unittest
782 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
784 (define-public python2-testscenarios
785 (package-with-python2 python-testscenarios))
787 (define-public python-testresources
789 (name "python-testresources")
795 "https://pypi.python.org/packages/source/t/testresources/testresources-"
799 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
800 (build-system python-build-system)
801 (home-page "https://launchpad.net/testresources")
803 "Pyunit extension for managing test resources")
805 "Testresources is an extension to Python's unittest to allow declarative
806 use of resources by test cases.")
807 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
809 (define-public python2-testresources
810 (package-with-python2 python-testresources))
812 (define-public python-subunit
814 (name "python-subunit")
820 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
824 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
825 (build-system python-build-system)
827 `(("python-extras" ,python-extras)
828 ("python-mimeparse" ,python-mimeparse)))
830 `(("python-testscenarios" ,python-testscenarios)))
831 (home-page "http://launchpad.net/subunit")
832 (synopsis "Python implementation of the subunit protocol")
834 "Python-subunit is a Python implementation of the subunit test streaming
836 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
838 (define-public python2-subunit
839 (package-with-python2 python-subunit))
841 (define-public python-fixtures
843 (name "python-fixtures")
848 (uri (pypi-uri "fixtures" version))
851 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
852 (build-system python-build-system)
855 (modify-phases %standard-phases
858 (zero? (system* "python" "-m" "testtools.run"
859 "fixtures.test_suite")))))))
861 `(("python-six" ,python-six)))
863 `(("python-mock" ,python-mock)
864 ("python-pbr-minimal" ,python-pbr-minimal)
865 ("python-testtools" ,python-testtools)))
866 (home-page "https://launchpad.net/python-fixtures")
867 (synopsis "Python test fixture library")
869 "Fixtures provides a way to create reusable state, useful when writing
871 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
873 (define-public python2-fixtures
874 (package-with-python2 python-fixtures))
876 (define-public python-testrepository
878 (name "python-testrepository")
884 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
888 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
889 (build-system python-build-system)
891 ;; FIXME: Many tests are failing.
894 `(("python-fixtures" ,python-fixtures)
895 ("python-subunit" ,python-subunit)
896 ("python-testtools" ,python-testtools)))
898 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
899 ("python-mimeparse" ,python-mimeparse)))
900 (home-page "https://launchpad.net/testrepository")
901 (synopsis "Database for Python test results")
902 (description "Testrepository provides a database of test results which can
903 be used as part of a developer's workflow to check things such as what tests
904 have failed since the last commit or what tests are currently failing.")
905 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
907 (define-public python2-testrepository
908 (package-with-python2 python-testrepository))
910 (define-public python-coverage
912 (name "python-coverage")
917 (uri (pypi-uri "coverage" version))
920 "097l4s3ssxm1vncsn0nw3a1pbzah28773q36c1ab9wz01r04973s"))))
921 (build-system python-build-system)
923 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
925 (home-page "http://nedbatchelder.com/code/coverage")
926 (synopsis "Code coverage measurement for Python")
928 "Coverage measures code coverage, typically during test execution. It
929 uses the code analysis tools and tracing hooks provided in the Python standard
930 library to determine which lines are executable, and which have been
932 (license license:bsd-3)))
934 (define-public python2-coverage
935 (package-with-python2 python-coverage))
937 (define-public python-cov-core
939 (name "python-cov-core")
944 (uri (pypi-uri "cov-core" version))
947 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
948 (build-system python-build-system)
950 `(("python-coverage" ,python-coverage)))
951 (home-page "https://github.com/schlamar/cov-core")
952 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
954 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
955 and @code{nose2-cov}. It is useful for developing coverage plugins for these
956 testing frameworks.")
957 (license license:expat)))
959 (define-public python2-cov-core
960 (package-with-python2 python-cov-core))
962 (define-public python-testpath
964 (name "python-testpath")
969 (uri (string-append "https://github.com/jupyter/testpath/archive/"
971 (file-name (string-append name "-" version ".tar.gz"))
974 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
975 (build-system python-build-system)
977 `(#:tests? #f ; this package does not even have a setup.py
978 #:modules ((guix build python-build-system)
981 #:imported-modules (,@%python-build-system-modules
984 (modify-phases %standard-phases
987 (lambda* (#:key inputs outputs #:allow-other-keys)
988 (let* ((version (last
989 (string-split (assoc-ref inputs "python") #\-)))
990 (x.y (string-join (take (string-split version #\.) 2)
993 (assoc-ref outputs "out")
994 "/lib/python" x.y "/site-packages/testpath")))
996 (copy-recursively "testpath" dir))
998 (home-page "https://github.com/takluyver/testpath")
999 (synopsis "Test utilities for code working with files and commands")
1001 "Testpath is a collection of utilities for Python code working with files
1002 and commands. It contains functions to check things on the file system, and
1003 tools for mocking system commands and recording calls to those.")
1004 (license license:expat)))
1006 (define-public python2-testpath
1007 (package-with-python2 python-testpath))
1009 (define-public python-testlib
1011 (name "python-testlib")
1017 "https://pypi.python.org/packages/source/t/testlib/testlib-"
1020 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
1021 (build-system python-build-system)
1023 `(("unzip" ,unzip))) ; for unpacking the source
1024 (synopsis "Python micro test suite harness")
1025 (description "A micro unittest suite harness for Python.")
1026 (home-page "https://github.com/trentm/testlib")
1027 (license license:expat)))
1029 (define-public python2-testlib
1030 (package-with-python2 python-testlib))
1032 ;;; The software provided by this package was integrated into pytest 2.8.
1033 (define-public python-pytest-cache
1035 (name "python-pytest-cache")
1039 (uri (pypi-uri "pytest-cache" version))
1042 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
1043 (build-system python-build-system)
1045 `(("python-apipkg" ,python-apipkg)
1046 ("python-execnet" ,python-execnet)
1047 ("python-py" ,python-py)
1048 ("python-pytest" ,python-pytest)))
1049 (synopsis "Py.test plugin with mechanisms for caching across test runs")
1050 (description "The pytest-cache plugin provides tools to rerun failures from
1051 the last py.test invocation.")
1052 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
1053 (license license:expat)))
1055 (define-public python2-pytest-cache
1056 (package-with-python2 python-pytest-cache))
1058 (define-public python-pytest-localserver
1060 (name "python-pytest-localserver")
1064 (uri (pypi-uri "pytest-localserver" version))
1067 "08f06rvj31wqf0vgmd1waya87r7vy6x8ck48lxl3dxy83q5gcam7"))))
1068 (build-system python-build-system)
1070 `(#:phases (modify-phases %standard-phases
1073 (zero? (system* "py.test" "--genscript=runtests.py"))
1074 (zero? (system* "py.test")))))))
1076 `(("python-pytest" ,python-pytest)
1077 ("python-requests" ,python-requests)
1078 ("python-six" ,python-six)))
1080 `(("python-werkzeug" ,python-werkzeug)))
1081 (synopsis "Py.test plugin to test server connections locally")
1082 (description "Pytest-localserver is a plugin for the pytest testing
1083 framework which enables you to test server connections locally.")
1084 (home-page "https://pypi.python.org/pypi/pytest-localserver")
1085 (license license:expat)))
1087 (define-public python-pytest-xprocess
1089 (name "python-pytest-xprocess")
1093 (uri (pypi-uri "pytest-xprocess" version))
1096 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
1097 (build-system python-build-system)
1099 `(("python-pytest" ,python-pytest)
1100 ("python-pytest-cache" ,python-pytest-cache)
1101 ("python-psutil" ,python-psutil)))
1102 (synopsis "Pytest plugin to manage external processes across test runs")
1103 (description "Pytest-xprocess is an experimental py.test plugin for managing
1104 processes across test runs.")
1105 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
1106 (license license:expat)))
1108 (define-public python-pytest-subtesthack
1110 (name "python-pytest-subtesthack")
1114 (uri (pypi-uri "pytest-subtesthack" version))
1117 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
1118 (build-system python-build-system)
1120 `(("python-pytest" ,python-pytest)))
1121 (synopsis "Set-up and tear-down fixtures for unit tests")
1122 (description "This plugin allows you to set up and tear down fixtures within
1123 unit test functions that use @code{py.test}. This is useful for using
1124 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
1125 function multiple times, without setting up or tearing down fixture state as is
1126 normally the case.")
1127 (home-page "https://github.com/untitaker/pytest-subtesthack/")
1128 (license license:unlicense)))
1130 (define-public python2-pytest-subtesthack
1131 (package-with-python2 python-pytest-subtesthack))
1133 (define-public python-hypothesis
1135 (name "python-hypothesis")
1139 (uri (pypi-uri "hypothesis" version))
1142 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
1143 (build-system python-build-system)
1145 `(("python-flake8" ,python-flake8)
1146 ("python-pytest" ,python-pytest-bootstrap)))
1147 (synopsis "Library for property based testing")
1148 (description "Hypothesis is a library for testing your Python code against a
1149 much larger range of examples than you would ever want to write by hand. It’s
1150 based on the Haskell library, Quickcheck, and is designed to integrate
1151 seamlessly into your existing Python unit testing work flow.")
1152 (home-page "https://github.com/DRMacIver/hypothesis")
1153 (license license:mpl2.0)
1154 (properties `((python2-variant . ,(delay python2-hypothesis))))))
1156 (define-public python2-hypothesis
1157 (let ((hypothesis (package-with-python2
1158 (strip-python2-variant python-hypothesis))))
1159 (package (inherit hypothesis)
1161 `(("python2-enum34" ,python2-enum34)
1162 ,@(package-propagated-inputs hypothesis))))))
1164 (define-public python-lit
1171 (uri (pypi-uri "lit" version))
1174 "0z651m3vkbk85y41larnsjxrszkbi58x9gzml3lb6ga7qwcrsg97"))))
1175 (build-system python-build-system)
1178 (modify-phases %standard-phases
1181 (invoke "python" "lit.py" "tests"))))))
1184 (home-page "https://llvm.org/")
1185 (synopsis "LLVM Software Testing Tool")
1186 (description "@code{lit} is a portable tool for executing LLVM and Clang
1187 style test suites, summarizing their results, and providing indication of
1189 (license license:ncsa)))
1191 (define-public python2-lit
1192 (package-with-python2 python-lit))
1194 (define-public python-pytest-pep8
1196 (name "python-pytest-pep8")
1200 (uri (pypi-uri "pytest-pep8" version))
1203 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
1204 (build-system python-build-system)
1206 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
1208 `(("python-pytest" ,python-pytest)))
1210 `(("python-pep8" ,python-pep8)))
1211 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
1212 (synopsis "Py.test plugin to check PEP8 requirements")
1213 (description "Pytest plugin for checking PEP8 compliance.")
1214 (license license:expat)))
1216 (define-public python2-pytest-pep8
1217 (package-with-python2 python-pytest-pep8))
1219 (define-public python-pytest-flakes
1221 (name "python-pytest-flakes")
1225 (uri (pypi-uri "pytest-flakes" version))
1228 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
1229 (build-system python-build-system)
1232 (modify-phases %standard-phases
1234 (add-after 'install 'check
1235 (lambda* (#:key outputs inputs #:allow-other-keys)
1236 ;; It's easier to run tests after install.
1237 ;; Make installed package available for running the tests
1238 (add-installed-pythonpath inputs outputs)
1239 (zero? (system* "py.test" "-vv")))))))
1241 `(("python-coverage" ,python-coverage)
1242 ("python-pytest" ,python-pytest)
1243 ("python-pytest-cache" ,python-pytest-cache)
1244 ("python-pytest-pep8" ,python-pytest-pep8)))
1246 `(("python-pyflakes" ,python-pyflakes)))
1247 (home-page "https://github.com/fschulze/pytest-flakes")
1248 (synopsis "Py.test plugin to check source code with pyflakes")
1249 (description "Pytest plugin for checking Python source code with pyflakes.")
1250 (license license:expat)))
1252 (define-public python2-pytest-flakes
1253 (package-with-python2 python-pytest-flakes))
1255 (define-public python2-coverage-test-runner
1257 (name "python2-coverage-test-runner")
1263 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
1264 "coverage-test-runner/snapshot/coverage-test-runner-"
1268 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
1269 (build-system python-build-system)
1271 `(#:python ,python-2
1273 (modify-phases %standard-phases
1276 (zero? (system* "./testrun")))))))
1278 `(("python2-coverage" ,python2-coverage)))
1279 (home-page "https://liw.fi/coverage-test-runner/")
1280 (synopsis "Python module for running unit tests")
1281 (description "@code{CoverageTestRunner} is a python module for running
1282 unit tests and failing them if the unit test module does not exercise all
1283 statements in the module it tests.")
1284 (license license:gpl3+)))
1286 (define-public python-pylint
1288 (name "python-pylint")
1294 "https://github.com/PyCQA/pylint/archive/pylint-"
1298 "0mzn1czhf1mgr2wiqfihb274sja02h899b85kywdpivppa9nwrmp"))))
1299 (build-system python-build-system)
1301 `(("python-pytest" ,python-pytest)
1302 ("python-pytest-runner" ,python-pytest-runner)
1303 ("python-tox" ,python-tox)))
1305 `(("python-astroid" ,python-astroid)
1306 ("python-isort" ,python-isort)
1307 ("python-mccabe" ,python-mccabe)
1308 ("python-six" ,python-six)))
1311 (modify-phases %standard-phases
1314 ;; Somehow, tests for python2-pylint
1315 ;; fail if run from the build directory
1316 (let ((work "/tmp/work"))
1318 (setenv "PYTHONPATH"
1319 (string-append (getenv "PYTHONPATH") ":" work))
1320 (copy-recursively "." work)
1321 (with-directory-excursion "/tmp"
1322 (zero? (system* "python" "-m" "unittest" "discover"
1323 "-s" (string-append work "/pylint/test")
1324 "-p" "*test_*.py")))))))))
1325 (home-page "https://github.com/PyCQA/pylint")
1326 (synopsis "Python source code analyzer which looks for coding standard
1328 (description "Pylint is a Python source code analyzer which looks
1329 for programming errors, helps enforcing a coding standard and sniffs
1330 for some code smells (as defined in Martin Fowler's Refactoring book).
1332 Pylint has many rules enabled by default, way too much to silence them
1333 all on a minimally sized program. It's highly configurable and handle
1334 pragmas to control it from within your code. Additionally, it is
1335 possible to write plugins to add your own checks.")
1336 (properties `((python2-variant . ,(delay python2-pylint))))
1337 (license license:gpl2+)))
1339 (define-public python2-pylint
1340 (let ((pylint (package-with-python2
1341 (strip-python2-variant python-pylint))))
1342 (package (inherit pylint)
1344 `(("python2-backports-functools-lru-cache"
1345 ,python2-backports-functools-lru-cache)
1346 ("python2-configparser" ,python2-configparser)
1347 ,@(package-propagated-inputs pylint))))))
1349 (define-public python-paramunittest
1351 (name "python-paramunittest")
1356 (uri (pypi-uri "ParamUnittest" version))
1359 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
1360 (build-system python-build-system)
1362 "https://github.com/rik0/ParamUnittest")
1364 "Simple extension to have parametrized unit tests")
1366 "This package allows to create parametrized unit-tests that work with the standard
1367 unittest package. A parametrized test case is automatically converted to multiple test
1368 cases. Since they are TestCase subclasses, they work with other test suites that
1369 recognize TestCases.")
1370 (license license:bsd-2)))
1372 (define-public python2-python-paramunittest
1373 (package-with-python2 python-paramunittest))
1375 (define-public python-pytest-warnings
1377 (name "python-pytest-warnings")
1382 (uri (pypi-uri "pytest-warnings" version))
1385 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
1386 (build-system python-build-system)
1388 `(("pytest" ,python-pytest)))
1389 (home-page "https://github.com/fschulze/pytest-warnings")
1390 (synopsis "Pytest plugin to list Python warnings in pytest report")
1392 "Python-pytest-warnings is a pytest plugin to list Python warnings in
1394 (license license:expat)))
1396 (define-public python2-pytest-warnings
1397 (package-with-python2 python-pytest-warnings))
1399 (define-public python-pytest-capturelog
1401 (name "python-pytest-capturelog")
1406 (uri (pypi-uri "pytest-capturelog" version ".tar.gz"))
1409 "038049nyjl7di59ycnxvc9nydivc5m8np3hqq84j2iirkccdbs5n"))))
1410 (build-system python-build-system)
1412 `(("pytest" ,python-pytest)))
1413 (home-page "https://bitbucket.org/memedough/pytest-capturelog/overview")
1414 (synopsis "Pytest plugin to catch log messages")
1416 "Python-pytest-catchlog is a pytest plugin to catch log messages.")
1417 (license license:expat)))
1419 (define-public python2-pytest-capturelog
1420 (package-with-python2 python-pytest-capturelog))
1422 (define-public python-pytest-catchlog
1424 (name "python-pytest-catchlog")
1429 (uri (pypi-uri "pytest-catchlog" version ".zip"))
1432 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
1433 (build-system python-build-system)
1435 `(("unzip" ,unzip)))
1437 `(("pytest" ,python-pytest)))
1438 (home-page "https://github.com/eisensheng/pytest-catchlog")
1439 (synopsis "Pytest plugin to catch log messages")
1441 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
1442 a fork of pytest-capturelog.")
1443 (license license:expat)))
1445 (define-public python2-pytest-catchlog
1446 (package-with-python2 python-pytest-catchlog))
1448 (define-public python-nosexcover
1450 (name "python-nosexcover")
1454 (uri (pypi-uri "nosexcover" version))
1457 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
1458 (build-system python-build-system)
1460 `(("python-coverage" ,python-coverage)
1461 ("python-nose" ,python-nose)))
1462 (home-page "http://github.com/cmheisel/nose-xcover")
1463 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
1464 (description "Nose-xcover is a companion to the built-in
1465 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
1466 to a file named coverage.xml.
1468 It will honor all the options you pass to the Nose coverage plugin,
1469 especially -cover-package.")
1470 (license license:expat)))
1472 (define-public python2-nosexcover
1473 (package-with-python2 python-nosexcover))
1475 (define-public python-discover
1477 (name "python-discover")
1483 "https://pypi.python.org/packages/source/d/discover/discover-"
1487 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
1488 (build-system python-build-system)
1489 (home-page "http://pypi.python.org/pypi/discover/")
1491 "Python test discovery for unittest")
1493 "Discover provides test discovery for unittest, a feature that has been
1494 backported from Python 2.7 for Python 2.4+.")
1495 (license license:bsd-3)))
1497 (define-public python2-discover
1498 (package-with-python2 python-discover))
1500 (define-public behave
1506 (uri (pypi-uri "behave" version ".tar.bz2"))
1509 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
1510 (build-system python-build-system)
1512 `(("python-mock" ,python-mock)
1513 ("python-nose" ,python-nose)
1514 ("python-pyhamcrest" ,python-pyhamcrest)))
1516 `(("python-six" ,python-six)
1517 ("python-parse" ,python-parse)
1518 ("python-parse-type" ,python-parse-type)))
1520 '(#:test-target "behave_test"))
1521 (home-page "https://github.com/behave/behave")
1522 (synopsis "Python behavior-driven development")
1524 "Behave is a tool for behavior-driven development in python.
1525 Behavior-driven development (or BDD) is an agile software development
1526 technique that encourages collaboration between developers, QA and
1527 non-technical or business participants in a software project. Behave uses
1528 tests written in a natural language style, backed up by Python code.")
1529 (license license:x11)))
1531 (define-public python-behave-web-api
1533 (name "python-behave-web-api")
1538 (uri (pypi-uri "behave-web-api" version))
1541 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
1542 (build-system python-build-system)
1545 (modify-phases %standard-phases
1546 (add-after 'unpack 'fix-dependencies
1548 (substitute* "setup.py"
1549 (("'wheel'") "") ; We don't use it.
1550 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
1552 `(("behave" ,behave)
1553 ("python-requests" ,python-requests)))
1554 (home-page "https://github.com/jefersondaniel/behave-web-api")
1555 (synopsis "Provides testing for JSON APIs with Behave for Python")
1556 (description "This package provides testing utility modules for testing
1557 JSON APIs with Behave.")
1558 (license license:expat)))
1560 (define-public python2-behave-web-api
1561 (package-with-python2 python-behave-web-api))
1563 (define-public python-rednose
1565 (name "python-rednose")
1570 (uri (pypi-uri "rednose" version))
1573 "11x5nx5b4wdq04s7vj1gcdl07jvvkfb37p0r5lg773gr5rr8mj6h"))))
1574 (build-system python-build-system)
1576 `(("python-colorama" ,python-colorama)
1577 ("python-termstyle" ,python-termstyle)))
1579 `(("python-six" ,python-six)
1580 ("python-nose" ,python-nose)))
1581 (home-page "https://github.com/JBKahn/rednose")
1582 (synopsis "Colored output for Python nosetests")
1583 (description "This package provides colored output for the
1584 @command{nosetests} command of the Python Nose unit test framework.")
1585 (license license:bsd-3)))
1587 (define-public python2-rednose
1588 (package-with-python2 python-rednose))
1590 (define-public python-nose-randomly
1592 (name "python-nose-randomly")
1597 (uri (pypi-uri "nose-randomly" version))
1600 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
1601 (build-system python-build-system)
1603 `(("python-nose" ,python-nose)
1604 ("python-numpy" ,python-numpy)))
1605 (home-page "https://github.com/adamchainz/nose-randomly")
1607 "Nose plugin to randomly order tests and control random.seed")
1609 "This is a @code{Nose} plugin to randomly order tests which can be quite
1610 powerful in discovering hidden flaws in the tests themselves, while helping to
1611 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
1612 by resetting it to a repeatable number for each test, enabling the tests to
1613 create data based on random numbers and yet remain repeatable.")
1614 (license license:bsd-3)))
1616 (define-public python2-nose-randomly
1617 (package-with-python2 python-nose-randomly))
1619 (define-public python-nose-timer
1621 (name "python-nose-timer")
1626 (uri (pypi-uri "nose-timer" version))
1629 ;; This patch will not be needed in the next version.
1630 ;; It is taken from the master branch.
1631 "python-nose-timer-drop-ordereddict.patch"))
1634 "1s32ymsnby8lz2qk55ifj9zi50dqcg6swnj5cz2rmwxg2jsslsxp"))))
1635 (build-system python-build-system)
1637 `(("python-nose" ,python-nose)
1638 ("python-termcolor" ,python-termcolor)))
1639 (home-page "https://github.com/mahmoudimus/nose-timer")
1640 (synopsis "Timer plugin for nosetests")
1641 (description "Shows how much time was needed to run individual tests.")
1642 (license license:expat)))
1644 (define-public python2-nose-timer
1645 (package-with-python2 python-nose-timer))
1647 (define-public python-freezegun
1649 (name "python-freezegun")
1654 (uri (pypi-uri "freezegun" version))
1657 "1vhf3kgdy7gpy70n3bxa3y1n6aza316137md97z8p5k0gz6wqg3q"))))
1658 (build-system python-build-system)
1660 `(("python-mock" ,python-mock)
1661 ("python-nose" ,python-nose)
1662 ("python-coverage" ,python-coverage)))
1664 `(("python-six" ,python-six)
1665 ("python-dateutil" ,python-dateutil)))
1668 (modify-phases %standard-phases
1669 ;; The tests are normally executed via `make test`, but the PyPi
1670 ;; package does not include the Makefile.
1673 (zero? (system* "nosetests" "./tests/")))))))
1674 (home-page "https://github.com/spulec/freezegun")
1675 (synopsis "Test utility for mocking the datetime module")
1677 "FreezeGun is a library that allows your python tests to travel through
1678 time by mocking the datetime module.")
1679 (license license:asl2.0)))
1681 (define-public python2-freezegun
1682 (package-with-python2 python-freezegun))
1684 (define-public python-flexmock
1686 (name "python-flexmock")
1690 (uri (pypi-uri "flexmock" version))
1693 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
1694 (build-system python-build-system)
1695 (home-page "https://flexmock.readthedocs.org")
1696 (synopsis "Testing library for Python")
1698 "flexmock is a testing library for Python that makes it easy to create
1699 mocks, stubs and fakes.")
1700 (license license:bsd-3)))
1702 (define-public python2-flexmock
1703 (package-with-python2 python-flexmock))
1705 (define-public python-flaky
1707 (name "python-flaky")
1711 (uri (pypi-uri "flaky" version))
1714 "18pkmf79rfkfpy1d2rrx3v55nxj762ilyk9rvd6s6dccxw58imsa"))))
1715 (build-system python-build-system)
1717 ;; TODO: Tests require 'coveralls' and 'genty' which are not in Guix yet.
1719 (home-page "https://github.com/box/flaky")
1720 (synopsis "Automatically rerun flaky tests")
1722 "Flaky is a plugin for @code{nose} or @code{py.test} that automatically
1725 Ideally, tests reliably pass or fail, but sometimes test fixtures must rely
1726 on components that aren't 100% reliable. With flaky, instead of removing
1727 those tests or marking them to @code{@@skip}, they can be automatically
1729 (license license:asl2.0)))
1731 (define-public python2-flaky
1732 (package-with-python2 python-flaky))
1734 (define-public python-pyhamcrest
1736 (name "python-pyhamcrest")
1742 "https://github.com/hamcrest/PyHamcrest/archive/V"
1746 (string-append name "-" version ".tar.gz"))
1749 "1lqjajhwf7x7igvvnj5p1cm31y9njy07qby94w18kl6zwbdjqrwy"))))
1750 (native-inputs ; All native inputs are for tests
1751 `(("python-pytest-cov" ,python-pytest-cov)
1752 ("python-mock" ,python-mock)
1753 ("python-pytest" ,python-pytest)
1754 ("python-hypothesis" ,python-hypothesis)))
1756 `(("python-six" ,python-six)))
1757 (build-system python-build-system)
1758 (home-page "http://hamcrest.org/")
1759 (synopsis "Hamcrest matchers for Python")
1761 "PyHamcrest is a framework for writing matcher objects,
1762 allowing you to declaratively define \"match\" rules.")
1763 (license license:bsd-3)))
1765 (define-public python2-pyhamcrest
1766 (package-with-python2 python-pyhamcrest))