1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2019, 2021, 2022 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2019, 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
6 ;;; Copyright © 2019, 2021 Hartmut Goebel <h.goebel@crazy-compilers.com>
7 ;;; Copyright © 2020, 2022 Julien Lepiller <julien@lepiller.eu>
8 ;;; Copyright © 2020, 2022 Marius Bakke <marius@gnu.org>
9 ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
10 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
11 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
12 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
13 ;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
14 ;;; Copyright © 2021, 2022 Guillaume Le Vaillant <glv@posteo.net>
15 ;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
16 ;;; Copyright © 2022 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
17 ;;; Copyright © 2022 Felix Gruber <felgru@posteo.net>
18 ;;; Copyright © 2022 Tomasz Jeneralczyk <tj@schwi.pl>
20 ;;; This file is part of GNU Guix.
22 ;;; GNU Guix is free software; you can redistribute it and/or modify it
23 ;;; under the terms of the GNU General Public License as published by
24 ;;; the Free Software Foundation; either version 3 of the License, or (at
25 ;;; your option) any later version.
27 ;;; GNU Guix is distributed in the hope that it will be useful, but
28 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 ;;; GNU General Public License for more details.
32 ;;; You should have received a copy of the GNU General Public License
33 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35 (define-module (gnu packages python-check)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages admin)
38 #:use-module (gnu packages base)
39 #:use-module (gnu packages bash)
40 #:use-module (gnu packages check)
41 #:use-module (gnu packages docker)
42 #:use-module (gnu packages django)
43 #:use-module (gnu packages openstack)
44 #:use-module (gnu packages perl)
45 #:use-module (gnu packages python-build)
46 #:use-module (gnu packages python-web)
47 #:use-module (gnu packages python-xyz)
48 #:use-module (gnu packages qt)
49 #:use-module (gnu packages web)
50 #:use-module (gnu packages xml)
51 #:use-module (gnu packages xorg)
52 #:use-module (guix utils)
53 #:use-module ((guix licenses) #:prefix license:)
54 #:use-module (guix packages)
55 #:use-module (guix gexp)
56 #:use-module (guix git-download)
57 #:use-module (guix download)
58 #:use-module (guix build-system python))
60 (define-public python-tappy
67 (uri (pypi-uri "tap.py" version))
70 "0w4w6pqjkv54j7rv6vdrpfxa72c5516bnlhpcqr3vrb4zpmyxvpm"))))
71 (build-system python-build-system)
72 (home-page "https://github.com/python-tap/tappy")
73 (synopsis "Tools for Test Anything Protocol")
74 (description "Tappy is a set of tools for working with the Test Anything
75 Protocol (TAP) in Python. TAP is a line based test protocol for recording test
76 data in a standard way.")
77 (license license:bsd-3)))
79 (define-public python-beartype
81 (name "python-beartype")
86 (uri (pypi-uri "beartype" version))
88 (base32 "0amzckgw9c93bl4jf0q6322j9wyyf3i8vl03yixfkrpllzv6kv14"))))
89 (build-system python-build-system)
92 #~(modify-phases %standard-phases
94 (lambda* (#:key tests? #:allow-other-keys)
96 (invoke "pytest" "-vv" "beartype_test"
97 ;; These tests rely on git through the
98 ;; "get_main_readme_file" helper.
100 (string-append "not test_doc_readme "
101 "and not test_sphinx "
102 "and not test_pep561_mypy"))))))))
104 (list python-pytest))
105 (home-page "https://github.com/beartype/beartype")
106 (synopsis "Fast runtime type checking for Python")
107 (description "Beartype aims to be a very fast runtime type checking tool
108 written in pure Python.")
109 (license license:expat)))
111 (define-public python-pytest-click
113 (name "python-pytest-click")
119 (pypi-uri "pytest_click" version))
121 (base32 "1rcv4m850rl7djzdgzz2zhjd8g5ih8w6l0sj2f9hsynymlsq82xl"))))
122 (build-system python-build-system)
124 (list python-click python-pytest))
125 (home-page "https://github.com/Stranger6667/pytest-click")
126 (synopsis "Py.test plugin for Click")
127 (description "This package provides a plugin to test Python click
128 interfaces with pytest.")
129 (license license:expat)))
131 (define-public python-pytest-cram
133 (name "python-pytest-cram")
137 (uri (pypi-uri "pytest-cram" version))
140 "0405ymmrsv6ii2qhq35nxfjkb402sdb6d13xnk53jql3ybgmiqq0"))))
141 (build-system python-build-system)
142 (propagated-inputs (list python-cram python-pytest))
143 (home-page "https://github.com/tbekolay/pytest-cram")
144 (synopsis "Run cram tests with pytest.")
145 (description "Cram tests command line applications; Pytest tests Python
146 applications. @code{pytest-cram} tests Python command line applications by
147 letting you write your Python API tests with pytest, and your command line
149 (license license:expat)))
151 (define-public python-pytest-csv
153 (name "python-pytest-csv")
157 (method git-fetch) ;no tests in PyPI archive
159 (url "https://github.com/nicoulaj/pytest-csv")
161 (file-name (git-file-name name version))
164 "17518f2fn5l98lyk9p8r7215c1whi61imzrh6ahrmcksr8w0zz04"))))
165 (build-system python-build-system)
168 (modify-phases %standard-phases
170 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
172 (add-installed-pythonpath inputs outputs)
173 (invoke "pytest")))))))
175 (list python-pytest-flake8 python-pytest-xdist-next python-tabulate))
177 (list python-pytest-6 python-six))
178 (home-page "https://github.com/nicoulaj/pytest-csv")
179 (synopsis "CSV reporter for Pytest")
180 (description "This package provides a plugin for Pytest that enables a
181 CSV output mode for Pytest. It can be enabled via the @option{--csv} option
182 it adds to the Pytest command line interface (CLI).")
183 (license license:gpl3+)))
185 (define-public python-testfixtures
187 (name "python-testfixtures")
192 (uri (pypi-uri "testfixtures" version))
194 (base32 "1nlv2hz20czjp4a811ichl5kwg99rh84l0mw9wq4rk3idzfs1hsy"))))
195 (build-system python-build-system)
197 `(#:tests? #f)) ; PyTest-Django fails to build in master
199 (list python-pytest python-pytest-cov
200 ;;("python-pytest-django" ,python-pytest-django)
201 python-twine python-wheel))
202 (synopsis "Tests components for Python")
203 (description "Testfixtures is a collection of helpers and mock objects that
204 are useful when writing automated tests in Python.")
205 (home-page "https://testfixtures.readthedocs.io/en/latest/")
206 (license license:expat)))
208 (define-public python-cucumber-tag-expressions
210 (name "python-cucumber-tag-expressions")
215 (uri (pypi-uri "cucumber-tag-expressions" version))
217 (base32 "0q7rn4l4ppjd1zsglr37ccc5xccg4iigaw827282zfzfsvzda573"))))
218 (build-system python-build-system)
221 #~(modify-phases %standard-phases
223 (lambda* (#:key tests? #:allow-other-keys)
225 ;; Ignore the configuration file since we don't
226 ;; need HTML reports, etc.
227 (invoke "pytest" "-c" "/dev/null" "-vv")))))))
229 (list python-invoke python-pathpy python-pytest))
230 (home-page "https://github.com/cucumber/tag-expressions-python")
231 (synopsis "Tag-expression parser for cucumber/behave")
233 "This package provides a tag-expression parser for Cucumber and
235 (license license:expat)))
237 (define-public python-coveralls
239 (name "python-coveralls")
241 (home-page "https://github.com/coveralls-clients/coveralls-python")
244 ;; The PyPI release lacks tests, so we pull from git instead.
246 (uri (git-reference (url home-page) (commit version)))
247 (file-name (git-file-name name version))
250 "1915ab77nfb1rfw4i2ps0zy19wpf20lwxn81qxxbwyd2gy7m0fn8"))))
251 (build-system python-build-system)
253 '(#:phases (modify-phases %standard-phases
254 (add-before 'check 'disable-git-test
256 ;; Remove test that requires 'git' and the full checkout.
257 (delete-file "tests/git_test.py")))
259 (lambda* (#:key tests? #:allow-other-keys)
261 (invoke "pytest" "-vv")
262 (format #t "test suite not run~%")))))))
264 (list python-coverage python-docopt python-pyyaml python-requests))
266 (list python-mock python-pytest python-responses))
267 (synopsis "Show coverage stats online via coveralls.io")
269 "Coveralls.io is a service for publishing code coverage statistics online.
270 This package provides seamless integration with coverage.py (and thus pytest,
271 nosetests, etc...) in Python projects.")
272 (license license:expat)))
274 (define-public python-junit-xml
275 ;; XXX: There are no tags or PyPI releases, so take the latest commit
276 ;; and use the version defined in setup.py.
277 (let ((version "1.9")
278 (commit "4bd08a272f059998cedf9b7779f944d49eba13a6")
281 (name "python-junit-xml")
282 (version (git-version version revision commit))
283 (home-page "https://github.com/kyrus/python-junit-xml")
286 (uri (git-reference (url home-page) (commit commit)))
287 (file-name (git-file-name name version))
290 "0b8kbjhk3j10rk0vcniy695m3h43yip6y93h1bd6jjh0cp7s09c7"))))
291 (build-system python-build-system)
293 `(#:phases (modify-phases %standard-phases
296 (invoke "pytest" "-vv"))))))
298 (list python-pytest))
301 (synopsis "Create JUnit XML test results")
303 "This package provides a Python module for creating JUnit XML test
304 result documents that can be read by tools such as Jenkins or Bamboo.")
305 (license license:expat))))
307 (define-public python-pyinstrument
309 (name "python-pyinstrument")
314 (uri (pypi-uri "pyinstrument" version))
316 (base32 "18n3waxsxcd48pmcp8158s5rlancll2000amrdck9zfj5hfpkhhx"))))
317 (build-system python-build-system)
321 python-pytest-asyncio
324 `(;; TODO: Get tests to work.
326 #:phases (modify-phases %standard-phases
328 (lambda* (#:key tests? #:allow-other-keys)
330 (invoke "pytest" "-vv")))))))
331 (home-page "https://github.com/joerick/pyinstrument")
332 (synopsis "Call stack profiler for Python")
334 "Pyinstrument is a Python profiler to help you optimize your code.")
335 (license license:bsd-3)))
337 (define-public python-vcrpy
339 (name "python-vcrpy")
344 (uri (pypi-uri "vcrpy" version))
346 (base32 "16gmzxs3lzbgf1828n0q61vbmwyhpvzdlk37x6gdk8n05zr5n2ap"))))
347 (build-system python-build-system)
350 (modify-phases %standard-phases
352 (lambda* (#:key tests? outputs #:allow-other-keys)
354 (substitute* "tox.ini"
355 (("AWS_ACCESS_KEY_ID") "PYTHONPATH"))
356 ;; These tests require network access.
357 (delete-file "tests/unit/test_stubs.py")
358 (invoke "pytest" "tests/unit")))))))
360 (list python-pyyaml python-six python-wrapt python-yarl))
371 python-pytest-httpbin
374 (home-page "https://github.com/kevin1024/vcrpy")
375 (synopsis "Automatically mock your HTTP interactions")
377 "VCR.py simplifies and speeds up tests that make HTTP requests. The first
378 time you run code that is inside a VCR.py context manager or decorated function,
379 VCR.py records all HTTP interactions that take place through the libraries it
380 supports and serializes and writes them to a flat file (in yaml format by
381 default). This flat file is called a cassette. When the relevant piece of code
382 is executed again, VCR.py will read the serialized requests and responses from
383 the aforementioned cassette file, and intercept any HTTP requests that it
384 recognizes from the original test run and return the responses that corresponded
385 to those requests. This means that the requests will not actually result in
386 HTTP traffic, which confers several benefits including:
388 @item The ability to work offline
389 @item Completely deterministic tests
390 @item Increased test execution speed
392 If the server you are testing against ever changes its API, all you need to do
393 is delete your existing cassette files, and run your tests again. VCR.py will
394 detect the absence of a cassette file and once again record all HTTP
395 interactions, which will update them to correspond to the new API.")
396 (license license:expat)))
398 (define-public python-pytest-ordering
400 (name "python-pytest-ordering")
404 ;; No tests in the PyPI tarball.
407 (url "https://github.com/ftobia/pytest-ordering")
409 (file-name (git-file-name name version))
411 (base32 "14msj5gyqza0gk3x7h1ivmjrwza82v84cj7jx3ks0fw9lpin7pjq"))))
412 (build-system python-build-system)
415 (modify-phases %standard-phases
417 (lambda* (#:key inputs outputs #:allow-other-keys)
418 (add-installed-pythonpath inputs outputs)
419 (invoke "pytest" "-vv" "-k"
420 ;; This test fails because of a type mismatch of an
421 ;; argument passed to @code{pytest.main}.
422 "not test_run_marker_registered"))))))
424 (list python-pytest))
425 (home-page "https://github.com/ftobia/pytest-ordering")
426 (synopsis "Pytest plugin to run your tests in a specific order")
428 "This plugin defines Pytest markers to ensure that some tests, or groups
429 of tests run in a specific order.")
430 (license license:expat)))
432 (define-public python-pytest-astropy-header
434 (name "python-pytest-astropy-header")
439 (uri (pypi-uri "pytest-astropy-header" version))
441 (base32 "1y87agr324p6x5gvhziymxjlw54pyn4gqnd49papbl941djpkp5g"))))
442 (build-system python-build-system)
444 (list python-pytest python-setuptools-scm))
445 (home-page "https://www.astropy.org/")
447 "Pytest plugin adding diagnostic data to the header of the test output")
449 "This plugin package provides a way to include information about the system,
450 Python installation, and select dependencies in the header of the output when
451 running pytest. It can be used with packages that are not affiliated with the
452 Astropy project, but is optimized for use with astropy-related projects.")
453 (license license:bsd-3)))
455 (define-public python-pytest-astropy
457 (name "python-pytest-astropy")
462 (uri (pypi-uri "pytest-astropy" version))
464 (base32 "18j6z6y2fvykmcs5z0mldhhaxxn6wzpnhlm2ps7m8r5z5kmh1631"))))
465 (build-system python-build-system)
467 `(#:tests? #f ; there are no tests
469 (modify-phases %standard-phases
470 ;; There is a bug somewhere that makes pytest-filter-subpackage appear
471 ;; as version 0.0.0 to setup.py. Remove it from the requirements.
472 (add-after 'unpack 'remove-requirement
474 (substitute* "setup.cfg"
475 ((".*pytest-filter-subpackage.*") "")))))))
477 (list python-attrs python-pytest-mock python-setuptools-scm))
479 (list python-hypothesis
480 python-pytest-arraydiff
481 python-pytest-astropy-header
483 python-pytest-doctestplus
484 python-pytest-filter-subpackage
485 python-pytest-openfiles
486 python-pytest-remotedata))
487 (home-page "https://github.com/astropy/pytest-astropy")
489 "Metapackage for all the testing machinery used by the Astropy Project")
491 "This is a meta-package that pulls in the dependencies that are used by
492 astropy related packages.")
493 (license license:bsd-3)))
495 (define-public python-pytest-arraydiff
497 (name "python-pytest-arraydiff")
502 (uri (pypi-uri "pytest-arraydiff" version))
504 (base32 "05bcvhh2ycxa35znl8b3l9vkcmx7vwm5c3fpakbpw46c7vsn4bfy"))))
505 (build-system python-build-system)
507 ;; Tests require python-astropy, which itself requires this package.
508 ;; Disable tests to avoid the circular dependency problem.
511 (list python-pytest)) ; for sanity-check
513 (list python-numpy python-six))
514 (home-page "https://github.com/astropy/pytest-arraydiff")
515 (synopsis "Pytest plugin to help with comparing array output from tests")
517 "This is a py.test plugin to facilitate the generation and comparison of
518 data arrays produced during tests, in particular in cases where the arrays
519 are too large to conveniently hard-code them in the tests.")
520 (license license:bsd-3)))
522 (define-public python-pytest-doctestplus
524 (name "python-pytest-doctestplus")
529 (uri (pypi-uri "pytest-doctestplus" version))
531 (base32 "0j1lvlj3ps975q9hmg8i6rpqm0313j3r18bc3l8mz6khb7vav4zk"))))
532 (build-system python-build-system)
535 (modify-phases %standard-phases
537 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
538 ;; Make the installed plugin discoverable by Pytest.
540 (add-installed-pythonpath inputs outputs)
541 (invoke "python" "-m" "pytest" "-k"
542 (string-append ; skip tests that require remote data
543 "not test_remote_data_url"
544 " and not test_remote_data_float_cmp"
545 " and not test_remote_data_ignore_whitespace"
546 " and not test_remote_data_ellipsis"
547 " and not test_remote_data_requires"
548 " and not test_remote_data_ignore_warnings"))))))))
550 (list python-pytest python-setuptools-scm))
551 (home-page "https://github.com/astropy/pytest-doctestplus")
552 (synopsis "Pytest plugin with advanced doctest features")
554 "This package contains a plugin for the Pytest framework that provides
555 advanced doctest support and enables the testing of reStructuredText files.")
556 (license license:bsd-3)))
558 (define-public python-pytest-exploratory
560 (name "python-pytest-exploratory")
565 (uri (pypi-uri "pytest_exploratory" version))
567 (base32 "159rcqv6wrdqdlag1gz39n6fk58232hbxshan043ljgpp1qfs6xk"))))
568 (build-system python-build-system)
571 (modify-phases %standard-phases
573 (lambda* (#:key tests? #:allow-other-keys)
575 (invoke "pytest" "tests")))))))
577 (list python-ipython python-py python-pytest))
578 (native-inputs (list python-pytest))
579 (home-page "https://github.com/nokia/pytest-exploratory")
580 (synopsis "Interactive console for Pytest")
581 (description "This Pytest plugin provides an IPython extension that allows
582 for interactively selecting and running Pytest tests.")
583 (license license:expat)))
585 (define-public python-pytest-filter-subpackage
587 (name "python-pytest-filter-subpackage")
592 (uri (pypi-uri "pytest-filter-subpackage" version))
594 (base32 "1s4s2kd31yc65rfvl4xhy8xx806xhy59kc7668h6b6wq88xgrn5p"))))
595 (build-system python-build-system)
597 '(;; One test is failing. There's an issue reported upstream. See
598 ;; https://github.com/astropy/pytest-filter-subpackage/issues/3.
599 ;; Disable it for now.
601 (modify-phases %standard-phases
603 (lambda* (#:key inputs outputs #:allow-other-keys)
604 ;; Make the installed plugin discoverable by Pytest.
605 (add-installed-pythonpath inputs outputs)
606 (invoke "pytest" "-vv" "-k" "not test_with_rst"))))))
608 (list python-pytest python-pytest-cov python-pytest-doctestplus))
609 (home-page "https://github.com/astropy/pytest-filter-subpackage")
610 (synopsis "Pytest plugin for filtering based on sub-packages")
612 "This package contains a simple plugin for the pytest framework that
613 provides a shortcut to testing all code and documentation for a given
615 (license license:bsd-3)))
617 (define-public python-pytest-helpers-namespace
619 (name "python-pytest-helpers-namespace")
620 (version "2021.3.24")
624 (uri (pypi-uri "pytest-helpers-namespace" version))
627 "0pyj2d45zagmzlajzqdnkw5yz8k49pkihbydsqkzm413qnkzb38q"))))
628 (build-system python-build-system)
631 (modify-phases %standard-phases
633 (lambda* (#:key inputs outputs #:allow-other-keys)
634 ;; Make the installed plugin discoverable by Pytest.
635 (add-installed-pythonpath inputs outputs)
636 (invoke "pytest" "-vv"))))))
638 (list python-pytest python-setuptools ; needs setuptools >= 50.3.2
639 python-setuptools-scm python-setuptools-declarative-requirements))
640 (home-page "https://github.com/saltstack/pytest-helpers-namespace")
641 (synopsis "Pytest Helpers Namespace Plugin")
642 (description "Pytest Helpers Namespace Plugin provides a helpers pytest
643 namespace which can be used to register helper functions without requiring
644 someone to import them in their actual tests to use them.")
645 (license license:asl2.0)))
647 (define-public python-pytest-metadata
649 (name "python-pytest-metadata")
654 (uri (pypi-uri "pytest-metadata" version))
656 (base32 "1wgcz0w053lnjln0081kjmfflaq7bwncxdzx7k63kr9lkpa0ddbi"))))
657 (build-system python-build-system)
660 #~(modify-phases %standard-phases
662 (lambda* (#:key tests? #:allow-other-keys)
664 (invoke "pytest" "-vv")))))))
665 (native-inputs (list python-pytest python-setuptools-scm))
666 (home-page "https://github.com/pytest-dev/pytest-metadata")
667 (synopsis "Access test session metadata with Pytest")
669 "@code{pytest-metadata} is a @command{pytest} plugin that provides
670 access to test session metadata.")
671 (license license:mpl2.0)))
673 (define-public python-pytest-openfiles
675 (name "python-pytest-openfiles")
680 (uri (pypi-uri "pytest-openfiles" version))
682 (base32 "0n0a7fdc9m86360y96l23fvdmd6rw04bl6h5xqgl9qxfv08jk70p"))))
683 (build-system python-build-system)
686 (modify-phases %standard-phases
688 (lambda* (#:key inputs outputs #:allow-other-keys)
689 ;; Make the installed plugin discoverable by Pytest.
690 (add-installed-pythonpath inputs outputs)
691 (invoke "pytest" "-vv"))))))
693 (list python-setuptools-scm python-pytest))
695 (list python-psutil))
696 (home-page "https://github.com/astropy/pytest-openfiles")
697 (synopsis "Pytest plugin for detecting inadvertent open file handles")
699 "This package provides a plugin for the pytest framework that allows
700 developers to detect whether any file handles or other file-like objects
701 were inadvertently left open at the end of a unit test.")
702 (license license:bsd-3)))
704 (define-public python-pytest-remotedata
706 (name "python-pytest-remotedata")
711 (uri (pypi-uri "pytest-remotedata" version))
713 (base32 "1h6g6shib6z07azf12rnsa053470ggbd7hy3bnbw8nf3nza5h372"))))
714 (build-system python-build-system)
717 (modify-phases %standard-phases
719 (lambda* (#:key inputs outputs #:allow-other-keys)
720 ;; Make the installed plugin discoverable by Pytest.
721 (add-installed-pythonpath inputs outputs)
722 (invoke "pytest" "-vv" "-k"
724 ;; These tests require internet access. Disable them.
725 "not test_default_behavior"
726 " and not test_strict_with_decorator")))))))
728 (list python-pytest))
731 (home-page "https://github.com/astropy/pytest-remotedata")
732 (synopsis "Pytest plugin for controlling remote data access")
734 "This package provides a plugin for the Pytest framework that allows
735 developers to control unit tests that require access to data from the
737 (license license:bsd-3)))
739 (define-public python-pytest-repeat
741 (name "python-pytest-repeat")
746 (uri (pypi-uri "pytest-repeat" version))
748 (base32 "0nxdbghjz6v4xidl5ky9wlx6z4has3vygj5r7va5ccdb8nbjilsw"))))
749 (build-system python-build-system)
752 (modify-phases %standard-phases
754 (lambda* (#:key tests? #:allow-other-keys)
756 (invoke "pytest")))))))
758 (list python-pytest))
760 (list python-setuptools-scm))
761 (home-page "https://github.com/pytest-dev/pytest-repeat")
762 (synopsis "Pytest plugin for repeating tests")
763 (description "@code{pytest-repeat} is a plugin for Pytest that makes it
764 enables repeating a single test, or multiple tests, a specific number of
766 (license license:mpl2.0)))
768 (define-public python-pytest-mockito
770 (name "python-pytest-mockito")
774 (method git-fetch) ;no tests in pypi archive
776 (url "https://github.com/kaste/pytest-mockito")
778 (file-name (git-file-name name version))
781 "0hnpazaw3mglx1c405z2hkavgan99rqb3wgrcqk8x5kmhpay53xx"))))
782 (build-system python-build-system)
785 (modify-phases %standard-phases
787 (lambda* (#:key tests? #:allow-other-keys)
789 (invoke "python" "-m" "pytest" "-vv")))))))
791 (list python-mockito python-pytest))
792 (home-page "https://github.com/kaste/pytest-mockito")
793 (synopsis "Mockito base fixtures for Pytest")
794 (description "The @code{pytest-mockito} plugin provides base Mockito
795 fixtures for Pytest. It covers the main entry points of the Mockito mocking
796 framework and makes it easy to undo any monkey patching. The fixtures are:
805 (license license:expat)))
807 (define-public python-pytest-mpl
809 (name "python-pytest-mpl")
814 (uri (pypi-uri "pytest-mpl" version))
816 (base32 "1km202c1s5kcn52fx0266p06qb34va3warcby594dh6vixxa9i96"))))
817 (build-system python-build-system)
820 (modify-phases %standard-phases
823 (invoke "pytest" "-vv"))))))
825 (list python-pytest))
827 (list python-matplotlib python-nose python-pillow))
828 (home-page "https://github.com/matplotlib/pytest-mpl")
829 (synopsis "Pytest plugin to help with testing figures output from Matplotlib")
831 "This is a plugin to facilitate image comparison for Matplotlib figures
833 (license license:bsd-3)))
835 (define-public python-pytest-pydocstyle
837 (name "python-pytest-pydocstyle")
843 (url "https://github.com/henry0312/pytest-pydocstyle")
844 (commit (string-append "v" version))))
845 (file-name (git-file-name name version))
847 (base32 "0w6fivz4nb4b70wzmi5sk17qs9pd05rnh03fmch6v00r3dmfpk39"))))
848 (build-system python-build-system)
850 `(#:tests? #f)) ; test requires the package itself
852 (list python-pydocstyle
853 python-pytest)) ;apparently required
854 (home-page "https://github.com/henry0312/pytest-pydocstyle")
855 (synopsis "Pytest plugin to run @command{pydocstyle}")
856 (description "This package provides a Pytest plugin to run
857 @command{pydocstyle}.")
858 (license license:expat)))
860 (define-public python-covdefaults
862 (name "python-covdefaults")
866 ;; The PyPI tarball does not include tests.
869 (url "https://github.com/asottile/covdefaults")
870 (commit (string-append "v" version))))
871 (file-name (git-file-name name version))
873 (base32 "11a24c0wzv01n55fy4kdpnyqna4m9k0mp58kmhiaks34xw4k37hq"))))
874 (build-system python-build-system)
877 (modify-phases %standard-phases
880 (invoke "pytest" "-vv"))))))
882 (list python-coverage python-pytest))
883 (home-page "https://github.com/asottile/covdefaults")
884 (synopsis "Coverage plugin to provide opinionated default settings")
886 "Covdefaults is a coverage plugin to provide opinionated default
888 (license license:expat)))
890 (define-public python-pytest-subtests
892 (name "python-pytest-subtests")
897 (uri (pypi-uri "pytest-subtests" version))
899 (base32 "087i03nmkmfnrpc7mmizvr40ijnjw4lfxc22rnk8jk6s1szy9lav"))))
900 (build-system python-build-system)
903 (modify-phases %standard-phases
905 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
907 (add-installed-pythonpath inputs outputs)
908 (invoke "python" "-m" "pytest")))))))
910 (list python-pytest python-setuptools-scm))
911 (home-page "https://github.com/pytest-dev/pytest-subtests")
912 (synopsis "Unittest subTest() support and subtests fixture")
913 (description "This Pytest plugin provides unittest @code{subTest()}
914 support and @code{subtests} fixture.")
915 (license license:expat)))
917 (define-public python-pytest-vcr
918 ;; This commit fixes integration with pytest-5
919 (let ((commit "4d6c7b3e379a6a7cba0b8f9d20b704dc976e9f05")
922 (name "python-pytest-vcr")
923 (version (git-version "1.0.2" revision commit))
928 (url "https://github.com/ktosiek/pytest-vcr")
930 (file-name (git-file-name name version))
933 "1yk988zi0la6zpcm3fff0mxf942di2jiymrfqas19nyngj5ygaqs"))))
934 (build-system python-build-system)
937 (modify-phases %standard-phases
939 (lambda* (#:key inputs outputs #:allow-other-keys)
940 (add-installed-pythonpath inputs outputs)
941 (invoke "pytest" "tests/"))))))
943 (list python-pytest python-vcrpy))
944 (home-page "https://github.com/ktosiek/pytest-vcr")
945 (synopsis "Plugin for managing VCR.py cassettes")
947 "Plugin for managing VCR.py cassettes.")
948 (license license:expat))))
950 (define-public python-pytest-doctest-custom
952 (name "python-pytest-doctest-custom")
957 (uri (pypi-uri "pytest-doctest-custom" version))
959 (base32 "0kxkdd6q9c3h31kc88lbyfll4c45b0zjd24cbr4c083fcvcy7lip"))))
960 (build-system python-build-system)
963 (modify-phases %standard-phases
965 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
967 (add-installed-pythonpath inputs outputs)
968 (invoke "python" "test_pytest_doctest_custom.py")))))))
970 (list python-pytest))
971 (home-page "https://github.com/danilobellini/pytest-doctest-custom")
973 "Pytest plugin to customize string representations of doctest results")
974 (description "This package provides a Pytest plugin for customizing string
975 representations of doctest results. It can change the display hook used by
976 doctest to render the object representations.")
977 (license license:expat)))
979 (define-public python-pytest-checkdocs
981 (name "python-pytest-checkdocs")
986 (uri (pypi-uri "pytest-checkdocs" version))
988 (base32 "1bn1wr3yz8avkwacffyh26za7mg20f9pajpakfk4cn7yvmgbhcrb"))))
989 (build-system python-build-system)
990 (arguments (list #:tests? #f)) ;no tests in pypi archive
992 (list python-docutils
993 python-importlib-metadata
996 (native-inputs (list python-setuptools-scm))
997 (home-page "https://github.com/jaraco/pytest-checkdocs")
998 (synopsis "Check the README when running tests")
1000 "This package provides a pytest plugin that checks the long description
1001 of the project to ensure it renders properly.")
1002 (license license:expat)))
1004 (define-public python-re-assert
1006 (name "python-re-assert")
1010 ;; There are no tests in the PyPI tarball.
1013 (url "https://github.com/asottile/re-assert")
1014 (commit (string-append "v" version))))
1015 (file-name (git-file-name name version))
1017 (base32 "1rssq4wpqmx1c17hjfx5l3sn3zmnlz9jffddiqrs4f6h7m6cadai"))))
1018 (build-system python-build-system)
1021 (modify-phases %standard-phases
1024 (invoke "pytest" "-vv"))))))
1026 (list python-covdefaults python-coverage python-pytest))
1028 (list python-regex))
1029 (home-page "https://github.com/asottile/re-assert")
1030 (synopsis "Show where your regex match assertion failed")
1032 "@code{re-assert} provides a helper class to make assertions of regexes
1034 (license license:expat)))
1036 (define-public python-pytest-trio
1038 (name "python-pytest-trio")
1043 (uri (pypi-uri "pytest-trio" version))
1045 (base32 "0c8cqf9by2884riksrqymqfp2g1d2d798a2zalcw9hmf34c786y0"))))
1046 (build-system python-build-system)
1049 (modify-phases %standard-phases
1051 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
1053 (add-installed-pythonpath inputs outputs)
1054 (invoke "pytest" "-W" "error" "-ra" "-v" "--pyargs"
1055 "pytest_trio" "--verbose" "--cov" "-k"
1058 "not test_async_yield_fixture_with_nursery"
1060 ;; No keyboard interrupt in our build environment.
1061 " and not test_actual_test"))))))))
1063 (list python-hypothesis python-pytest python-pytest-cov))
1065 (list python-async-generator python-outcome python-pytest python-trio))
1066 (home-page "https://github.com/python-trio/pytest-trio")
1067 (synopsis "Pytest plugin for trio")
1069 "This is a pytest plugin to help you test projects that use Trio, a
1070 friendly library for concurrency and async I/O in Python.")
1071 ;; Either license applies.
1072 (license (list license:expat license:asl2.0))))
1074 (define-public python-pytest-flake8
1076 (name "python-pytest-flake8")
1081 (uri (pypi-uri "pytest-flake8" version))
1084 "0syx68xk5ss3hgp3nr2y122w0fgkzr5936ghsqrkymh3m5hrf9gh"))))
1085 (build-system python-build-system)
1087 (list python-flake8))
1089 (list python-pytest))
1090 (home-page "https://github.com/tholo/pytest-flake8")
1091 (synopsis "Pytest plugin to check FLAKE8 requirements")
1093 "This package provides a pytest plugin for efficiently checking PEP8
1095 (license license:bsd-3)))
1097 (define-public python-pytest-isort
1099 (name "python-pytest-isort")
1104 (uri (pypi-uri "pytest-isort" version))
1106 (base32 "05wi28zlqk3jafpjal8j523y5jcsx3xl3id9rx93qfjgkif8q6l2"))))
1107 (build-system python-build-system)
1110 (modify-phases %standard-phases
1112 (lambda* (#:key tests? #:allow-other-keys)
1114 (invoke "pytest")))))))
1116 (list python-isort python-pytest))
1119 (home-page "https://github.com/moccu/pytest-isort/")
1120 (synopsis "Pytest plugin to check import ordering using isort")
1122 "This package provides a pytest plugin to check import ordering using
1124 (license license:bsd-3)))
1126 (define-public python-pytest-shutil
1128 (name "python-pytest-shutil")
1133 (uri (pypi-uri "pytest-shutil" version))
1136 "0q8j0ayzmnvlraml6i977ybdq4xi096djhf30n2m1rvnvrhm45nq"))))
1137 (build-system python-build-system)
1140 (modify-phases %standard-phases
1141 (add-after 'unpack 'use-path-instead-of-path.py
1142 ;; path.py is obsolete.
1144 (substitute* "setup.py"
1147 (add-after 'unpack 'patch-tests
1150 (substitute* "tests/integration/test_cmdline_integration.py"
1151 (("dirname = '/bin'")
1152 "dirname = '/tmp/bin'")
1153 (("bindir = os.path.realpath\\('/bin'\\)")
1154 "bindir = os.path.realpath('/tmp/bin')")))))))
1156 (list python-contextlib2 python-execnet python-path python-termcolor))
1158 (list python-mock python-pytest python-setuptools-git))
1159 (home-page "https://github.com/manahl/pytest-plugins")
1160 (synopsis "Assorted shell and environment tools for py.test")
1162 "This package provides assorted shell and environment tools for the
1163 py.test testing framework.")
1164 (license license:expat)))
1166 (define-public python-pytest-fixture-config
1168 (name "python-pytest-fixture-config")
1173 (uri (pypi-uri "pytest-fixture-config" version))
1176 "13i1qpz22w3x4dmw8vih5jdnbqfqvl7jiqs0dg764s0zf8bp98a1"))))
1177 (build-system python-build-system)
1179 (list python-pytest python-setuptools-git))
1180 (home-page "https://github.com/manahl/pytest-plugins")
1181 (synopsis "Fixture configuration utils for py.test")
1183 "This package provides fixture configuration utilities for the py.test
1184 testing framework.")
1185 (license license:expat)))
1187 (define-public python-pytest-virtualenv
1189 (name "python-pytest-virtualenv")
1194 (uri (pypi-uri "pytest-virtualenv" version))
1197 "03w2zz3crblj1p6i8nq17946hbn3zqp9z7cfnifw47hi4a4fww12"))))
1198 (build-system python-build-system)
1201 (modify-phases %standard-phases
1202 ;; Reference the virtualenv executable directly, to avoid the need
1203 ;; for PYTHONPATH, which gets cleared when instantiating a new
1204 ;; virtualenv with pytest-virtualenv.
1205 (add-after 'unpack 'patch-virtualenv-executable
1206 (lambda* (#:key inputs #:allow-other-keys)
1207 (let* ((virtualenv (assoc-ref inputs "python-virtualenv"))
1208 (virtualenv-bin (string-append virtualenv
1209 "/bin/virtualenv")))
1210 (substitute* "pytest_virtualenv.py"
1211 (("^DEFAULT_VIRTUALENV_FIXTURE_EXECUTABLE.*$")
1212 (format #f "DEFAULT_VIRTUALENV_FIXTURE_EXECUTABLE = '~a'"
1216 (list python-pytest-shutil python-pytest-fixture-config))
1218 (list python-virtualenv))
1220 (list python-mock python-pytest python-setuptools-git))
1221 (home-page "https://github.com/manahl/pytest-plugins")
1222 (synopsis "Virtualenv fixture for py.test")
1223 (description "This package provides a virtualenv fixture for the py.test
1225 (license license:expat)))
1227 (define-public python-pytest-pycodestyle
1229 (name "python-pytest-pycodestyle")
1234 (uri (pypi-uri "pytest-pycodestyle" version))
1237 "1clyjypn93hwvz17f4i6n2688835d4y8qsq2aw17d6fkbqiy8mg7"))))
1238 (build-system python-build-system)
1240 (list python-pycodestyle))
1242 (list python-pytest))
1243 (home-page "https://github.com/henry0312/pytest-pycodestyle")
1244 (synopsis "Pytest plugin to run pycodestyle")
1245 (description "This package provides a plugin to run @code{pycodestyle}
1246 for the @code{pytest} framework.")
1247 (license license:expat)))
1249 (define-public python-pytest-benchmark
1251 (name "python-pytest-benchmark")
1256 (uri (pypi-uri "pytest-benchmark" version))
1259 "0ivvrnhax2xr62grlgw4hlyjmmjp6nc35431j7c82nny2bwn7qj0"))))
1260 (build-system python-build-system)
1262 '(#:test-target "check"))
1264 (list python-py-cpuinfo))
1266 (list python-pytest))
1267 (home-page "https://github.com/ionelmc/pytest-benchmark")
1268 (synopsis "Pytest fixture for benchmarking code")
1270 "This package provides a pytest fixture that will group the tests into
1271 rounds that are calibrated to the chosen timer.")
1272 (license license:bsd-2)))
1274 (define-public python-pytest-xvfb
1276 (name "python-pytest-xvfb")
1281 (uri (pypi-uri "pytest-xvfb" version))
1283 (base32 "1kyq5rg27dsnj7dc6x9y7r8vwf8rc88y2ppnnw6r96alw0nn9fn4"))))
1284 (build-system python-build-system)
1286 `(#:test-target "pytest"
1288 (modify-phases %standard-phases
1289 (add-before 'build 'prepare-tests
1292 (setenv "DISPLAY" ":0")
1294 ;; This test is meant to run on Windows.
1295 (delete-file "tests/test_xvfb_windows.py")
1298 (list python-pytest python-pytest-runner xorg-server-for-tests))
1300 (list python-pyvirtualdisplay))
1301 (home-page "https://github.com/The-Compiler/pytest-xvfb")
1302 (synopsis "Pytest plugin to run Xvfb for tests")
1304 "This package provides a Pytest plugin to run Xvfb for tests.")
1305 (license license:expat)))
1307 (define-public python-pytest-services
1309 (name "python-pytest-services")
1314 (uri (pypi-uri "pytest-services" version))
1317 "0b2zfv04w6m3gp2v44ifdhx22vcji069qnn95ry3zcyxib7cjnq3"))))
1318 (build-system python-build-system)
1319 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
1321 (list python-psutil python-requests))
1323 (list python-pytest))
1324 (home-page "https://github.com/pytest-dev/pytest-services")
1325 (synopsis "Services plugin for pytest testing framework")
1327 "This plugin provides a set of fixtures and utility functions to start
1328 service processes for your tests with pytest.")
1329 (license license:expat)))
1331 (define-public python-pytest-toolbox
1333 (name "python-pytest-toolbox")
1337 ;; No tests in the PyPI tarball.
1340 (url "https://github.com/samuelcolvin/pytest-toolbox")
1341 (commit (string-append "v" version))))
1342 (file-name (git-file-name name version))
1344 (base32 "1wqkr3g5gmqdxmhzfsxbwy8pm3cadaj6a8cxq58w9bacly4hqbh0"))))
1345 (build-system python-build-system)
1348 (modify-phases %standard-phases
1350 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
1352 (substitute* "setup.cfg"
1353 ((".*timeout.*") ""))
1354 ;; Make the installed plugin discoverable by Pytest.
1355 (add-installed-pythonpath inputs outputs)
1356 (invoke "pytest" "-vv")))))))
1358 (list python-pydantic python-pytest python-pytest-isort))
1359 (home-page "https://github.com/samuelcolvin/pytest-toolbox")
1360 (synopsis "Numerous useful plugins for Pytest")
1362 "Pytest Toolbox contains many useful plugins for Pytest. Among them are
1363 new fixtures, new methods and new comparison objects.")
1364 (license license:expat)))
1366 (define-public python-pytest-aiohttp
1368 (name "python-pytest-aiohttp")
1373 (uri (pypi-uri "pytest-aiohttp" version))
1376 "0kx4mbs9bflycd8x9af0idcjhdgnzri3nw1qb0vpfyb3751qaaf9"))))
1377 (build-system python-build-system)
1379 (list python-pytest))
1381 (list python-aiohttp))
1382 (home-page "https://github.com/aio-libs/pytest-aiohttp/")
1383 (synopsis "Pytest plugin for aiohttp support")
1384 (description "This package provides a pytest plugin for aiohttp support.")
1385 (license license:asl2.0)))
1387 (define-public python-nbval
1389 (name "python-nbval")
1394 (uri (pypi-uri "nbval" version))
1396 (base32 "0h3xrnw0mj1srigrx2rfnd73h8s0xjycclmjs0vx7qkfyqpcvvyg"))))
1397 (build-system python-build-system)
1400 (modify-phases %standard-phases
1401 (add-before 'check 'fix-test
1403 ;; This test fails because of a mismatch in the output of LaTeX
1404 ;; equation environments. Seems OK to skip.
1406 "tests/ipynb-test-samples/test-latex-pass-correctouput.ipynb")))
1408 (lambda* (#:key tests? #:allow-other-keys)
1410 (invoke "pytest" "-vv" "-k"
1412 ;; This only works with Pytest < 5.
1413 "not nbdime_reporter"
1414 ;; https://github.com/computationalmodelling/nbval/pull/148.
1415 " and not test_timeouts"
1416 ;; It seems the output format has changed; the following
1417 ;; test fails with "Unexpected output fields from
1418 ;; running code: {'text/plain'}".
1419 " and not test_conf_ignore_stderr "))))))))
1421 (list python-pytest python-pytest-cov python-sympy))
1423 (list python-ipykernel python-jupyter-client python-nbformat
1425 (home-page "https://github.com/computationalmodelling/nbval")
1426 (synopsis "Pytest plugin to validate Jupyter notebooks")
1428 "This plugin adds functionality to Pytest to recognise and collect Jupyter
1429 notebooks. The intended purpose of the tests is to determine whether execution
1430 of the stored inputs match the stored outputs of the @file{.ipynb} file. Whilst
1431 also ensuring that the notebooks are running without errors.")
1432 (license license:bsd-3)))
1434 (define-public python-pytest-flask
1436 (name "python-pytest-flask")
1441 (uri (pypi-uri "pytest-flask" version))
1444 "1hln7mwgdzfi5ma0kqfsi768l7p24jhkw8l0imhifwy08nh7hmjd"))))
1445 (build-system python-build-system)
1447 (list python-flask python-pytest python-setuptools-scm
1449 (home-page "https://github.com/pytest-dev/pytest-flask")
1450 (synopsis "Pytest fixtures to test Flask applications")
1452 "This pytest plugin provides fixtures to simplify Flask app testing.")
1453 (license license:expat)))
1455 (define-public python-pytest-console-scripts
1457 (name "python-pytest-console-scripts")
1462 (uri (pypi-uri "pytest-console-scripts" version))
1465 "1qsw3i2h3psyi5avwf14panx8wxqfik2z7294dy37w8ha415iwn7"))))
1466 (build-system python-build-system)
1469 (modify-phases %standard-phases
1471 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1473 (add-installed-pythonpath inputs outputs)
1474 (invoke "pytest" "--verbose"
1475 ;; This one test fails because of PATH assumptions
1476 "-k" "not test_elsewhere_in_the_path")))))))
1478 (list python-mock python-pytest))
1480 (list python-setuptools-scm))
1481 (home-page "https://github.com/kvas-it/pytest-console-scripts")
1482 (synopsis "Pytest plugin for testing console scripts")
1484 "This package provides a pytest plugin for testing console scripts.")
1485 (license license:expat)))
1487 (define-public python-pytest-tornado
1489 (name "python-pytest-tornado")
1492 (method git-fetch) ;no tests in pypi archive
1494 (url "https://github.com/eugeniy/pytest-tornado")
1495 (commit (string-append "v" version))))
1496 (file-name (git-file-name name version))
1499 "05hgq1m9g35kpc01im7ci1wd85xi1rdxnyms9izjg65c9976zn6x"))))
1500 (build-system python-build-system)
1504 #~(modify-phases %standard-phases
1506 (lambda* (#:key tests? #:allow-other-keys)
1508 (invoke "pytest" "-vv")))))))
1509 (propagated-inputs (list python-pytest python-setuptools python-tornado))
1510 (home-page "https://github.com/eugeniy/pytest-tornado")
1511 (synopsis "Pytest plugin to ease testing tornado applications")
1513 "This package provides a py.test plugin providing fixtures and markers to
1514 simplify testing of asynchronous tornado applications.")
1515 (license license:asl2.0)))
1517 (define-public python-pytest-tornasync
1519 (name "python-pytest-tornasync")
1520 (version "0.6.0.post2")
1524 (uri (pypi-uri "pytest-tornasync" version))
1527 "0pdyddbzppkfqwa7g17sdfl4w2v1hgsky78l8f4c1rx2a7cvd0fp"))))
1528 (build-system python-build-system)
1530 `(#:tests? #false ; TODO: fails at "from test import MESSAGE, PAUSE_TIME"
1532 (modify-phases %standard-phases
1534 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1536 (add-installed-pythonpath inputs outputs)
1537 (invoke "pytest" "--verbose")))))))
1539 (list python-pytest python-tornado))
1540 (home-page "https://github.com/eukaryote/pytest-tornasync")
1541 (synopsis "Pytest plugin for testing Tornado code")
1543 "This package provides a simple pytest plugin that provides some helpful
1544 fixtures for testing Tornado (version 5.0 or newer) apps and easy handling of
1545 plain (undecoratored) native coroutine tests.")
1546 (license license:expat)))
1548 (define-public python-pytest-celery
1550 (name "python-pytest-celery")
1555 (uri (pypi-uri "pytest-celery" version))
1557 (base32 "01pli108qqiiyrn8qsqqabcpazrzj27r7cji9wgglsk76by61l6g"))))
1558 (build-system python-build-system)
1560 `(#:tests? #f ; no tests and circular dependency on python-celery
1562 (modify-phases %standard-phases
1563 (delete 'sanity-check)))) ; checks for celery
1564 (home-page "https://github.com/graingert/pytest-celery")
1565 (synopsis "Shim pytest plugin to enable @code{celery.contrib.pytest}")
1567 "This package provides a shim Pytest plugin to enable a Celery marker.")
1568 (license license:bsd-3)))
1570 (define-public python-pytest-env
1572 (name "python-pytest-env")
1577 (uri (pypi-uri "pytest-env" version))
1579 (base32 "1hl0ln0cicdid4qjk7mv90lw9xkb0v71dlj7q7rn89vzxxm9b53y"))))
1580 (build-system python-build-system)
1582 (list python-pytest))
1583 (home-page "https://github.com/MobileDynasty/pytest-env")
1584 (synopsis "Pytest plugin that allows you to add environment variables")
1586 "This is a @code{py.test} plugin that enables you to set environment
1587 variables in the @file{pytest.ini} file.")
1588 (license license:expat)))
1590 (define-public python-pyux
1592 (name "python-pyux")
1597 (uri (pypi-uri "pyux" version))
1600 "1i17xh4dy238ibrjdgh8vn78fk5q6dj37mcznpvdfzidj57js7ca"))))
1601 (build-system python-build-system)
1603 `(#:tests? #f)) ;the mini test suite fails
1604 (home-page "https://github.com/farizrahman4u/pyux")
1605 (synopsis "Utility to check API integrity in Python libraries")
1606 (description "The pyux utility detects API changes in Python
1608 (license license:expat)))
1610 (define-public python-pytest-qt
1612 (name "python-pytest-qt")
1617 (uri (pypi-uri "pytest-qt" version))
1619 (base32 "09c9psfn3zigpaw1l1cmynpa3csxa49wc2ih5lzl24skdkw0njvi"))))
1620 (build-system python-build-system)
1622 `(#:test-target "pytest"
1624 (modify-phases %standard-phases
1625 (add-before 'check 'set-qpa
1627 (setenv "QT_QPA_PLATFORM" "offscreen")
1630 (list python-pyqt-without-qtwebkit))
1632 (list python-pytest python-pytest-runner python-setuptools-scm))
1633 (home-page "https://github.com/pytest-dev/pytest-qt")
1634 (synopsis "Pytest support for PyQt and PySide applications")
1636 "@code{pytest-qt} is a Pytest plugin that allows programmers to write
1637 tests for PyQt5 and PySide2 applications.
1639 The main usage is to use the @code{qtbot} fixture, responsible for handling
1640 @code{qApp} creation as needed and provides methods to simulate user
1641 interaction, like key presses and mouse clicks.")
1642 (license license:expat)))
1644 (define-public python-codacy-coverage
1646 (name "python-codacy-coverage")
1651 (uri (pypi-uri "codacy-coverage" version))
1654 "1g0c0w56xdkmqb8slacyw5qhzrkp814ng3ddh2lkiij58y9m2imr"))))
1655 (build-system python-build-system)
1657 `(#:tests? #f)); no tests
1659 (list python-check-manifest python-requests))
1660 (home-page "https://github.com/codacy/python-codacy-coverage")
1661 (synopsis "Codacy coverage reporter for Python")
1662 (description "This package analyses Python test suites and reports how much
1663 of the code is covered by them. This tool is part of the Codacy suite for
1664 analysing code quality.")
1665 (license license:expat)))
1667 (define-public python-httmock
1669 (name "python-httmock")
1674 (uri (pypi-uri "httmock" version))
1677 "1zj1fcm0n6f0wr9mr0hmlqz9430fnr5cdwd5jkcvq9j44bnsrfz0"))))
1678 (build-system python-build-system)
1680 `(#:tests? #f)); no tests
1682 (list python-requests))
1683 (home-page "https://github.com/patrys/httmock")
1684 (synopsis "Mocking library for requests")
1685 (description "This package provides a library for replying fake data to
1686 Python software under test, when they make an HTTP query.")
1687 (license license:asl2.0)))
1689 (define-public python-atpublic
1691 (name "python-atpublic")
1696 (uri (pypi-uri "atpublic" version))
1699 "0i3sbxkdlbb4560rrlmwwd5y4ps7k73lp4d8wnmd7ag9k426gjkx"))))
1700 (build-system python-build-system)
1703 (modify-phases %standard-phases
1704 (add-before 'build 'enable-c-implementation
1706 (setenv "ATPUBLIC_BUILD_EXTENSION" "yes")
1710 (invoke "python" "-m" "nose2" "-v"))))))
1712 (list python-nose2))
1713 (home-page "https://public.readthedocs.io/")
1714 (synopsis "@code{@@public} decorator for populating @code{__all__}")
1716 "This Python module adds a @code{@@public} decorator and function which
1717 populates a module's @code{__all__} and optionally the module globals. With
1718 it, the declaration of a name's public export semantics are not separated from
1719 the implementation of that name.")
1720 (license (list license:asl2.0
1721 license:lgpl3)))) ; only for setup_helpers.py
1723 (define-public python-mockito
1725 (name "python-mockito")
1729 (method git-fetch) ;no tests in pypi archive
1731 (url "https://github.com/kaste/mockito-python")
1733 (file-name (git-file-name name version))
1736 "0fg8jflcf4c929gd4zbcrk73d08waaqjfjmdjrgnv54mzl35pjxl"))))
1737 (build-system python-build-system)
1740 (modify-phases %standard-phases
1742 (lambda* (#:key tests? #:allow-other-keys)
1744 (invoke "pytest")))))))
1746 (list python-numpy python-pytest))
1747 (home-page "https://github.com/kaste/mockito-python")
1748 (synopsis "Mocking library for Python")
1749 (description "This package provides a Python implementation of the Java
1750 library of the same name. It eases monkey patching, for example to stub out
1751 side effects when unit testing.")
1752 (license license:expat)))
1754 (define-public python-mypy-extensions
1756 (name "python-mypy-extensions")
1761 (uri (pypi-uri "mypy_extensions" version))
1764 "1a04qsk8hd1lqns8w1j7cr0vmvbhg450di5k1i16kqxkbf7q30id"))))
1765 (build-system python-build-system)
1766 (arguments `(#:tests? #f)); no tests
1767 (home-page "https://github.com/python/mypy_extensions")
1768 (synopsis "Experimental extensions for MyPy")
1769 (description "The @code{python-mypy-extensions} module defines
1770 experimental extensions to the standard @code{typing} module that are
1771 supported by the MyPy typechecker.")
1772 (license license:expat)))
1774 (define-public python-mypy
1776 (name "python-mypy")
1780 ;; Because of https://github.com/python/mypy/issues/9584, the
1781 ;; mypyc/analysis directory is missing in the PyPI archive, leading to
1785 (url "https://github.com/python/mypy")
1786 (commit (string-append "v" version))
1787 ;; Fetch git submodules otherwise typeshed is not fetched.
1788 ;; Typeshed is a collection of Python sources type annotation
1791 (file-name (git-file-name name version))
1794 "0i8swdynms1wpiprgqn24za6mx8rlgxr2jash3cb5xi8jyf58n97"))))
1795 (build-system python-build-system)
1798 (modify-phases %standard-phases
1800 (lambda* (#:key tests? #:allow-other-keys)
1802 (invoke "pytest" "-vv" "mypyc"
1803 ;; XXX: This test gets an unexpected DeprecationWarning
1804 ;; from recent versions of setuptools. Ignore for now.
1805 "-k" "not testImports")))))))
1811 python-pytest-forked
1815 (list python-mypy-extensions python-tomli python-typing-extensions))
1816 (home-page "http://www.mypy-lang.org/")
1817 (synopsis "Static type checker for Python")
1818 (description "Mypy is an optional static type checker for Python that aims
1819 to combine the benefits of dynamic typing and static typing. Mypy combines
1820 the expressive power and convenience of Python with a powerful type system and
1821 compile-time type checking. Mypy type checks standard Python programs; run
1822 them using any Python VM with basically no runtime overhead.")
1823 ;; Most of the code is under MIT license; Some files are under Python Software
1824 ;; Foundation License version 2: stdlib-samples/*, mypyc/lib-rt/pythonsupport.h and
1825 ;; mypyc/lib-rt/getargs.c
1826 (license (list license:expat license:psfl))))
1828 ;;; This variant exists to break a cycle between python-pylama and python-isort.
1829 (define-public python-mypy-minimal
1832 (inherit python-mypy)
1833 (name "python-mypy-minimal")
1836 #:phases (modify-phases %standard-phases
1837 ;; XXX: Fails with: "In procedure utime: No such file or
1839 (delete 'ensure-no-mtimes-pre-1980))))
1840 (native-inputs '()))))
1842 (define-public python-nptyping
1844 (name "python-nptyping")
1847 (method git-fetch) ;pypi only contains a binary wheel
1849 (url "https://github.com/ramonhagenaars/nptyping")
1850 (commit (string-append "v" version))))
1851 (file-name (git-file-name name version))
1854 "0839mcrv5jljq9k9124ssnl1hc1inbxwlwjk72imabsbqssjy9rb"))))
1855 (build-system python-build-system)
1858 (modify-phases %standard-phases
1859 (add-before 'build 'set-source-date-epoch
1861 ;; Otherwise the wheel building test would fail with "ZIP does
1862 ;; not support timestamps before 1980".
1863 (setenv "SOURCE_DATE_EPOCH" "315532800"))))))
1865 (list python-beartype
1869 (propagated-inputs (list python-numpy python-typing-extensions))
1870 (home-page "https://github.com/ramonhagenaars/nptyping")
1871 (synopsis "Type hints for Numpy")
1872 (description "This package provides extensive dynamic type checks for
1873 dtypes and shapes of arrays for NumPy, extending @code{numpy.typing}.")
1874 (license license:expat)))
1876 (define-public python-pylama
1878 (name "python-pylama")
1883 (uri (pypi-uri "pylama" version))
1886 "13vx7daqz2918y9s8q3v2i3xaq3ah43a9p58srqi6hqskkpm7blv"))))
1887 (build-system python-build-system)
1889 `(#:phases (modify-phases %standard-phases
1890 (add-after 'unpack 'disable-failing-tests
1892 ;; Fails with: "ImportError: cannot import name
1893 ;; 'commented_out_code_line_numbers' from 'eradicate'".
1894 (delete-file "pylama/lint/pylama_eradicate.py")
1895 ;; Requires python-astroid, which fails to build on
1896 ;; Python 3.9+ (see:
1897 ;; https://github.com/PyCQA/astroid/issues/881).
1898 (delete-file "pylama/lint/pylama_pylint.py"))))))
1900 (list python-py python-pytest python-radon))
1902 `(("python-mccabe" ,python-mccabe)
1903 ("python-mypy", python-mypy-minimal)
1904 ("python-pycodestyle" ,python-pycodestyle)
1905 ("python-pydocstyle" ,python-pydocstyle)
1906 ("python-pyflakes" ,python-pyflakes)))
1907 (home-page "https://github.com/klen/pylama")
1908 (synopsis "Code audit tool for python")
1909 (description "Pylama is a code audit tool for Python and JavaScript to check
1910 for style, syntax and other code health metrics. It is essentially a
1911 convenient wrapper above tools such as Pyflakes, pydocstyle, pycodestyle and
1912 McCabe, among others.")
1913 (license license:lgpl3+)))
1915 (define-public python-pyannotate
1917 (name "python-pyannotate")
1922 (uri (pypi-uri "pyannotate" version))
1925 "16bm0mf7wxvy0lgmcs1p8n1ji8pnvj1jvj8zk3am70dkp825iv84"))))
1926 (build-system python-build-system)
1928 (list python-mypy-extensions python-six))
1930 "https://github.com/dropbox/pyannotate")
1931 (synopsis "Auto-generate PEP-484 annotations")
1932 (description "This package, PyAnnotate, is used to auto-generate PEP-484
1934 (license license:asl2.0)))
1936 (define-public python-eradicate
1938 (name "python-eradicate")
1943 (uri (pypi-uri "eradicate" version))
1946 "1j30g9jfmbfki383qxwrfds8b23yiwywj40lng4lqcf5yab4ahr7"))))
1947 (build-system python-build-system)
1948 (home-page "https://github.com/myint/eradicate")
1949 (synopsis "Remove commented-out code from Python sources")
1950 (description "The @command{eradicate} command removes commented-out code
1951 from Python files. It does this by detecting block comments that contain
1952 valid Python syntax that are likely to be commented out code.")
1953 (license license:expat)))
1955 (define-public python-robber
1957 (name "python-robber")
1961 (uri (pypi-uri "robber" version))
1964 "0xp5csgv2g9q38hscml6bc5i1nm4xy5lzqqiimm2drxsf0hw2nq5"))))
1965 (build-system python-build-system)
1966 ;; There are no tests in the tarball downloaded from PyPI.
1967 ;; The last version tagged in Github (0.1.0) is older than the one on PyPI.
1968 ;; Reported upstream: <https://github.com/vesln/robber.py/issues/20>.
1969 (arguments '(#:tests? #f))
1971 (list python-mock python-termcolor))
1972 ;; URL of the fork used to generate the package available on PyPI.
1973 (home-page "https://github.com/EastAgile/robber.py")
1974 (synopsis "Test-driven development (TDD) assertion library for Python")
1975 (description "Robber is a Python assertion library for test-driven and
1976 behavior-driven development (TDD and BDD).")
1977 (license license:expat)))
1979 (define-public python-stestr
1981 (name "python-stestr")
1986 (uri (pypi-uri "stestr" version))
1989 "1kg9gfdr4bj2m7s1r44z530a0ba4p17j4jlhcn1xha0j8jmyfgn2"))))
1990 (build-system python-build-system)
1992 `(#:tests? #f)) ;to avoid circular dependencies
2003 (home-page "https://stestr.readthedocs.io/en/latest/")
2004 (synopsis "Parallel Python test runner")
2005 (description "This package provides the @command{stestr} command, a
2006 parallel Python test runner built around @code{subunit}. It is designed to
2007 execute @code{unittest} test suites using multiple processes to split up
2008 execution of a test suite. It will also store a history of all test runs to
2009 help in debugging failures and optimizing the scheduler to improve speed.")
2010 (license license:asl2.0)))
2012 ;; This is only used by python-sanic
2013 (define-public python-pytest-sanic
2015 (name "python-pytest-sanic")
2019 (uri (pypi-uri "pytest-sanic" version))
2022 "0shq1bqnydj0l3ipb73j1qh5kqcjvzkps30zk8grq3dwmh3wmnkr"))))
2023 (build-system python-build-system)
2025 ;; Tests depend on python-sanic.
2028 (list python-httpx python-async-generator python-pytest
2031 "https://github.com/yunstanford/pytest-sanic")
2032 (synopsis "Pytest plugin for Sanic")
2033 (description "A pytest plugin for Sanic. It helps you to test your
2034 code asynchronously.")
2035 (license license:expat)))
2037 (define-public python-allpairspy
2039 (name "python-allpairspy")
2044 (uri (pypi-uri "allpairspy" version))
2046 (base32 "1c987h13dly9919d15w3h747rgn50ilnv7dginhlprxbj564hn4k"))))
2047 (build-system python-build-system)
2049 (list python-pytest python-pytest-runner))
2050 (home-page "https://github.com/thombashi/allpairspy")
2051 (synopsis "Pairwise test combinations generator")
2053 "This is a Python library for test combinations generator. The generator
2054 allows one to create a set of tests using @emph{pairwise combinations} method,
2055 reducing a number of combinations of variables into a lesser set that covers
2057 (license license:expat)))
2059 (define-public python-pytest-mp
2061 (name "python-pytest-mp")
2067 (url "https://github.com/ansible/pytest-mp")
2068 (commit "49a8ff2ca9ef62d8c86854ab31d6b5d5d6cf3f28")))
2069 (file-name (git-file-name name version))
2071 (base32 "01v98b6n3yvkfmxf2v38xk5ijqlk6ika0yljwkhl5bh6qhq23498"))))
2072 (build-system python-build-system)
2074 (list python-pytest python-psutil))
2076 ;; tests require setuptools-markdown, which is deprecated and not in guix
2079 (modify-phases %standard-phases
2080 (add-after 'unpack 'remove-useless-requirements
2082 (substitute* "setup.py"
2083 ((" setup_requires=") " #")))))))
2084 (home-page "https://github.com/ansible/pytest-mp")
2085 (synopsis "Segregate tests into several processes")
2086 (description "pytest-mp is a minimalist approach to distribute and
2087 segregate pytest tests across processes using python's multiprocessing library
2088 and is heavily inspired by pytest-concurrent and pytest-xdist. As a very
2089 early beta, it doesn't pledge or intend to support the majority of platforms
2090 or use cases. Design is based on supporting slow, io-bound testing with often
2091 tedious system under test configuration that can benefit from running several
2092 tests at one time.")
2093 (license license:expat)))
2095 (define-public python-aioresponses
2097 (name "python-aioresponses")
2102 (uri (pypi-uri "aioresponses" version))
2104 (base32 "16p8mdyfirddrsay62ji7rwcrqmmzxzf2isdbfm9cj5p338rbr42"))))
2105 (build-system python-build-system)
2108 (modify-phases %standard-phases
2110 (lambda* (#:key tests? #:allow-other-keys)
2113 "pytest" "-vv" "tests" "-k"
2115 ;; These tests require network access.
2116 "not test_address_as_instance_of_url_combined_with_pass_through "
2117 "and not test_pass_through_with_origin_params"))))))))
2119 (list python-pbr python-ddt python-pytest))
2121 (list python-aiohttp))
2122 (home-page "https://github.com/pnuckowski/aioresponses")
2123 (synopsis "Mock out requests made by ClientSession from aiohttp package")
2125 "Aioresponses is a helper to mock/fake web requests in python aiohttp
2126 package. For requests module there are a lot of packages that help us with
2127 testing (eg. httpretty, responses, requests-mock). When it comes to testing
2128 asynchronous HTTP requests it is a bit harder (at least at the beginning).
2129 The purpose of this package is to provide an easy way to test asynchronous
2131 (license license:expat)))
2133 (define-public python-avocado-framework
2135 (name "python-avocado-framework")
2140 (uri (pypi-uri "avocado-framework" version))
2142 (base32 "0zhz6423p0b5gqx2mvg7dmq8m9gbsay7wqjdwzirlwcg2v3rcz0m"))))
2143 (build-system python-build-system)
2146 ;; The test suite hangs, due to a serious bug in Python/Avocado (see:
2147 ;; https://github.com/avocado-framework/avocado/issues/4935).
2150 #~(modify-phases %standard-phases
2151 (add-after 'unpack 'patch-paths
2152 (lambda* (#:key native-inputs inputs #:allow-other-keys)
2153 ;; These are runtime dependencies (inputs).
2154 (substitute* "avocado/plugins/spawners/podman.py"
2155 (("default='/usr/bin/podman'")
2156 "default='podman'"))
2157 (substitute* "avocado/utils/podman.py"
2158 (("\"/usr/bin/env\", \"python3\"")
2159 (format #f "~s" (search-input-file inputs "bin/python"))))
2160 (substitute* "avocado/utils/memory.py"
2162 (format #f "~s" (search-input-file inputs "bin/sync")))
2164 (search-input-file inputs "bin/sh")))
2165 ;; Batch process the tests modules with less care; if something
2166 ;; is wrong, the test suite will fail. These are tests
2167 ;; dependencies (native inputs).
2168 (substitute* (find-files "selftests" "\\.py$")
2170 (string-append "#!" (search-input-file (or native-inputs inputs)
2172 (("/bin/(false|true|sh|sleep|sudo)" _ name)
2173 (search-input-file (or native-inputs inputs)
2174 (string-append "bin/" name))))))
2175 (add-after 'unpack 'remove-broken-entrypoints
2176 ;; The avocado-external-runner entry point fails to load, the
2177 ;; 'scripts' top level package not being found (see:
2178 ;; https://github.com/avocado-framework/avocado/issues/5370).
2180 (substitute* "setup.py"
2181 (("'avocado-external-runner = scripts.external_runner:main'.*")
2184 (lambda* (#:key tests? #:allow-other-keys)
2186 (setenv "HOME" "/tmp")
2187 (setenv "PYTHONPATH" (getcwd))
2188 (invoke "./selftests/check.py" "--skip" "static-checks")))))))
2189 (native-inputs (list bash-minimal coreutils-minimal perl sudo))
2190 (inputs (list bash-minimal coreutils-minimal))
2191 (home-page "https://avocado-framework.github.io/")
2192 (synopsis "Tools and libraries to help with automated testing")
2193 (description "Avocado is a set of tools and libraries to help with
2194 automated testing, i.e. a test framework. Native tests are written in Python
2195 and they follow the unittest pattern, but any executable can serve as a
2196 test. The following output formats are supported:
2199 an XML format that contains test results in a structured form, and are used by
2200 other test automation projects, such as Jenkins.
2202 a widely used data exchange format. The JSON Avocado plugin outputs job
2203 information, similarly to the xunit output plugin.
2205 Provides the basic TAP (Test Anything Protocol) results. Unlike most existing
2206 Avocado machine readable outputs this one is streamlined (per test results).
2208 (license license:gpl2))) ;some files are under GPLv2 only
2210 (define-public python-parameterizedtestcase
2212 (name "python-parameterizedtestcase")
2217 (uri (pypi-uri "parameterizedtestcase" version))
2219 (base32 "0zhjmsd16xacg4vd7zb75kw8q9khn52wvad634v1bvz7swaivk2c"))))
2220 (build-system python-build-system)
2221 (native-inputs (list python-setuptools)) ;for use_2to3
2223 "https://github.com/msabramo/python_unittest_parameterized_test_case")
2224 (synopsis "Parameterized tests for Python's unittest module")
2225 (description "This package provides parameterized tests for Python's
2226 @code{unittest} module taking inspiration from pytest.")
2227 (license license:expat)))
2229 (define-public python-pytest-rerunfailures
2231 (name "python-pytest-rerunfailures")
2236 (uri (pypi-uri "pytest-rerunfailures" version))
2238 (base32 "15v68kggjvkflbqr0vz8gp5yp3pcsk0rz05bpg2l4xp0a6nin7ly"))))
2239 (build-system python-build-system)
2240 (propagated-inputs (list python-pytest python-setuptools))
2241 (home-page "https://github.com/pytest-dev/pytest-rerunfailures")
2242 (synopsis "Pytest plugin to re-run flaky tests")
2243 (description "This package provides a pytest plugin to re-run tests to
2244 eliminate flaky failures.")
2245 (license license:mpl2.0)))
2247 (define-public python-xunitparser
2249 (name "python-xunitparser")
2254 (uri (pypi-uri "xunitparser" version))
2256 (base32 "00lapxi770mg7jkw16zy3a91hbdfz4a9h43ryczdsgd3z4cl6vyf"))))
2257 (build-system python-build-system)
2260 (modify-phases %standard-phases
2261 ;; See https://github.com/laurentb/xunitparser/pull/11
2262 (add-after 'unpack 'fix-test-suite
2264 (substitute* "xunitparser.py"
2265 (("(^ +)self.stderr = None" m indent)
2266 (string-append m "\n" indent "self._cleanup = False\n"))))))))
2267 (home-page "http://git.p.engu.in/laurentb/xunitparser/")
2268 (synopsis "Read JUnit/XUnit XML files and map them to Python objects")
2269 (description "xunitparser reads a JUnit/XUnit XML file and maps it to
2270 Python objects. It tries to use the objects available in the standard
2271 @code{unittest} module.")
2272 (license license:expat)))
2274 (define-public python-test-utils
2276 (name "python-test-utils")
2281 (uri (pypi-uri "test-utils" version))
2283 (base32 "0cs0gyihnkj8ya4yg3ld3ly73mpxrkn2gq9acamclhqvhxsv7zd6"))))
2284 (build-system python-build-system)
2285 (home-page "https://github.com/Kami/python-test-utils/")
2286 (synopsis "Utilities for functional and integration tests")
2288 "This package provides a collection of utility functions and classes
2289 which make writing and running functional and integration tests easier.")
2290 (license license:asl2.0)))
2292 (define-public python-tox
2299 (uri (pypi-uri "tox" version))
2302 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
2303 (build-system python-build-system)
2307 #~(modify-phases %standard-phases
2309 (lambda* (#:key tests? #:allow-other-keys)
2311 (invoke "pytest" "-vv" "-k"
2314 (string-append "not test_" test))
2315 '("invocation_error"
2316 "create_KeyboadInterrupt"
2318 "tox_get_python_executable"
2319 "find_alias_on_path"
2321 "get_executable_no_exist"
2322 "get_sitepackagesdir_error"
2323 "spinner_stdout_not_unicode"
2324 "provision_non_canonical_dep"
2325 "package_setuptools"
2327 "parallel_interrupt"
2329 "provision_from_pyvenv"
2330 "provision_interrupt_child"
2332 "run_custom_install_command"
2334 "different_config_cwd"
2336 "build_backend_without_submodule"
2339 "tox_env_var_flags_inserted_isolated"))
2342 (list python-filelock
2352 python-pytest ; >= 2.3.5
2353 python-pytest-freezegun
2354 python-pytest-timeout
2355 python-setuptools-scm))
2356 (home-page "https://tox.readthedocs.io")
2357 (synopsis "Virtualenv-based automation of test activities")
2358 (description "Tox is a generic virtualenv management and test command line
2359 tool. It can be used to check that a package installs correctly with
2360 different Python versions and interpreters, or run tests in each type of
2361 supported environment, or act as a frontend to continuous integration
2363 (license license:expat)))
2365 (define-public python-sybil
2367 (name "python-sybil")
2372 (uri (pypi-uri "sybil" version))
2374 (base32 "03ak1w93linfqx6c9lwgq5niyy3j9yblv4ip40hmlzmg0hidq0kg"))))
2375 (build-system python-build-system)
2378 (modify-phases %standard-phases
2380 (lambda* (#:key tests? #:allow-other-keys)
2382 (invoke "pytest")))))))
2383 (native-inputs (list python-pytest python-pytest-cov))
2384 (home-page "https://github.com/simplistix/sybil")
2385 (synopsis "Automated testing for examples in code and documentation")
2387 "This library provides a way to check examples in your code and
2388 documentation by parsing them from their source and evaluating the
2389 parsed examples as part of your normal test run. Integration is
2390 provided for the main Python test runners.")
2391 (license license:expat)))
2393 (define-public python-pytest-httpx
2395 (name "python-pytest-httpx")
2399 ;; pypi package doesn't include the tests
2402 (url "https://github.com/Colin-b/pytest_httpx")
2403 (commit (string-append "v" version))))
2404 (file-name (git-file-name name version))
2406 (base32 "12mcy1f5d5cq3rqrqgi2ar0qvzw62ibys17hw6dsdfd0j2syck4r"))))
2407 (build-system python-build-system)
2410 (modify-phases %standard-phases
2412 (lambda* (#:key tests? #:allow-other-keys)
2414 (setenv "PYTHONPATH" (getcwd))
2415 (invoke "pytest" "-vv")))))))
2416 (propagated-inputs (list python-httpx))
2417 (native-inputs (list python-pytest python-pytest-asyncio))
2418 (home-page "https://colin-b.github.io/pytest_httpx/")
2419 (synopsis "Pytest plugin to mock httpx")
2420 (description "This package provides a pytest fixture to mock httpx
2421 requests to be replied to with user provided responses.")
2422 (license license:expat)))
2424 (define-public python-pycotap
2426 (name "python-pycotap")
2431 (uri (pypi-uri "pycotap" version))
2433 (base32 "1v69fxial9i5wlap6wc4igq3hydvxbak7dlgb7cikk8wjgafqf7r"))))
2434 (build-system python-build-system)
2435 (home-page "https://el-tramo.be/pycotap")
2436 (synopsis "Tiny Python TAP test runner")
2437 (description "This package provides a simple Python test runner for
2438 unittest that outputs Test Anything Protocol (TAP) results to standard
2439 output. Contrary to other TAP runners for Python, pycotap...
2442 prints TAP (and only TAP) to standard output instead of to a separate file,
2443 allowing you to pipe it directly to TAP pretty printers and processors;
2444 @item only contains a TAP reporter, so no parsers, no frameworks, no
2447 is configurable: you can choose how you want the test output and test result
2448 diagnostics to end up in your TAP output (as TAP diagnostics, YAML blocks, or
2451 (license license:expat)))
2453 (define-public python-xvfbwrapper
2455 (name "python-xvfbwrapper")
2459 (uri (pypi-uri "xvfbwrapper" version))
2462 "097wxhvp01ikqpg1z3v8rqhss6f1vwr399zpz9a05d2135bsxx5w"))))
2463 (build-system python-build-system)
2464 (propagated-inputs (list xorg-server-for-tests))
2465 (home-page "https://github.com/cgoldberg/xvfbwrapper")
2466 (synopsis "Python module for controlling virtual displays with Xvfb")
2468 "Xvfb (X virtual framebuffer) is a display server implementing
2469 the X11 display server protocol. It runs in memory and does not require a
2470 physical display. Only a network layer is necessary. Xvfb is useful for
2471 running acceptance tests on headless servers.")
2472 (license license:expat)))