1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
6 ;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
7 ;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
8 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
9 ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
10 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
11 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages python-check)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages check)
31 #:use-module (gnu packages python-web)
32 #:use-module (gnu packages python-xyz)
33 #:use-module (gnu packages web)
34 #:use-module (gnu packages xml)
35 #:use-module (guix utils)
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (guix packages)
38 #:use-module (guix git-download)
39 #:use-module (guix download)
40 #:use-module (guix build-system python))
42 (define-public python-coveralls
44 (name "python-coveralls")
46 (home-page "https://github.com/coveralls-clients/coveralls-python")
49 ;; The PyPI release lacks tests, so we pull from git instead.
51 (uri (git-reference (url home-page) (commit version)))
52 (file-name (git-file-name name version))
55 "1zr1lqdjcfwj6wcx2449mzzjq8bbhwnqcm5vdif5s8hlz35bjxkp"))))
56 (build-system python-build-system)
58 '(#:phases (modify-phases %standard-phases
59 (add-before 'check 'disable-git-test
61 ;; Remove test that requires 'git' and the full checkout.
62 (delete-file "tests/git_test.py")
65 (lambda* (#:key tests? #:allow-other-keys)
67 (invoke "pytest" "-vv")
68 (format #t "test suite not run~%"))
71 `(("python-coverage" ,python-coverage)
72 ("python-docopt" ,python-docopt)
73 ("python-pyyaml" ,python-pyyaml)
74 ("python-requests" ,python-requests)))
76 `(("python-mock" ,python-mock)
77 ("python-pytest" ,python-pytest)))
78 (synopsis "Show coverage stats online via coveralls.io")
80 "Coveralls.io is a service for publishing code coverage statistics online.
81 This package provides seamless integration with coverage.py (and thus pytest,
82 nosetests, etc...) in Python projects.")
83 (license license:expat)))
85 (define-public python-vcrpy
92 (uri (pypi-uri "vcrpy" version))
95 "0kws7l3hci1dvjv01nxw3805q9v2mwldw58bgl8s90wqism69gjp"))))
96 (build-system python-build-system)
97 (arguments `(#:tests? #f)) ; tests require more packages for python-pytest-httpbin
99 `(("python-pyyaml" ,python-pyyaml)
100 ("python-six" ,python-six)
101 ("python-wrapt" ,python-wrapt)
102 ("python-yarl" ,python-yarl)))
104 `(("python-mock" ,python-mock)
105 ("python-pytest" ,python-pytest)
106 ("python-pytest-httpbin" ,python-pytest-httpbin)))
107 (home-page "https://github.com/kevin1024/vcrpy")
108 (synopsis "Automatically mock your HTTP interactions")
110 "VCR.py simplifies and speeds up tests that make HTTP requests. The first
111 time you run code that is inside a VCR.py context manager or decorated function,
112 VCR.py records all HTTP interactions that take place through the libraries it
113 supports and serializes and writes them to a flat file (in yaml format by
114 default). This flat file is called a cassette. When the relevant piece of code
115 is executed again, VCR.py will read the serialized requests and responses from
116 the aforementioned cassette file, and intercept any HTTP requests that it
117 recognizes from the original test run and return the responses that corresponded
118 to those requests. This means that the requests will not actually result in
119 HTTP traffic, which confers several benefits including:
121 @item The ability to work offline
122 @item Completely deterministic tests
123 @item Increased test execution speed
125 If the server you are testing against ever changes its API, all you need to do
126 is delete your existing cassette files, and run your tests again. VCR.py will
127 detect the absence of a cassette file and once again record all HTTP
128 interactions, which will update them to correspond to the new API.")
129 (license license:expat)))
131 (define-public python-pytest-ordering
133 (name "python-pytest-ordering")
137 ;; No tests in the PyPI tarball.
140 (url "https://github.com/ftobia/pytest-ordering")
142 (file-name (git-file-name name version))
144 (base32 "14msj5gyqza0gk3x7h1ivmjrwza82v84cj7jx3ks0fw9lpin7pjq"))))
145 (build-system python-build-system)
148 (modify-phases %standard-phases
150 (lambda* (#:key inputs outputs #:allow-other-keys)
151 (add-installed-pythonpath inputs outputs)
152 (invoke "pytest" "-vv" "-k"
153 ;; This test fails because of a type mismatch of an
154 ;; argument passed to @code{pytest.main}.
155 "not test_run_marker_registered"))))))
157 `(("python-pytest" ,python-pytest)))
158 (home-page "https://github.com/ftobia/pytest-ordering")
159 (synopsis "Pytest plugin to run your tests in a specific order")
161 "This plugin defines Pytest markers to ensure that some tests, or groups
162 of tests run in a specific order.")
163 (license license:expat)))
165 (define-public python-pytest-arraydiff
167 (name "python-pytest-arraydiff")
172 (uri (pypi-uri "pytest-arraydiff" version))
174 (base32 "05bcvhh2ycxa35znl8b3l9vkcmx7vwm5c3fpakbpw46c7vsn4bfy"))))
175 (build-system python-build-system)
177 ;; Tests require python-astropy, which itself requires this package.
178 ;; Disable tests to avoid the circular dependency problem.
181 `(("python-numpy" ,python-numpy)
182 ("python-six" ,python-six)))
183 (home-page "https://github.com/astropy/pytest-arraydiff")
184 (synopsis "Pytest plugin to help with comparing array output from tests")
186 "This is a py.test plugin to facilitate the generation and comparison of
187 data arrays produced during tests, in particular in cases where the arrays
188 are too large to conveniently hard-code them in the tests.")
189 (license license:bsd-3)))
191 (define-public python-pytest-doctestplus
193 (name "python-pytest-doctestplus")
198 (uri (pypi-uri "pytest-doctestplus" version))
200 (base32 "1ai9kvd7xbq2jg2h8gmkb8lqzyrxvdh4zg3vxndg149iwd1hyi7d"))))
201 (build-system python-build-system)
204 (modify-phases %standard-phases
206 (lambda* (#:key inputs outputs #:allow-other-keys)
207 ;; Make the installed plugin discoverable by Pytest.
208 (add-installed-pythonpath inputs outputs)
209 (invoke "pytest" "-vv"))))))
211 `(("python-pytest" ,python-pytest)))
212 (home-page "https://github.com/astropy/pytest-doctestplus")
213 (synopsis "Pytest plugin with advanced doctest features")
215 "This package contains a plugin for the Pytest framework that provides
216 advanced doctest support and enables the testing of reStructuredText files.")
217 (license license:bsd-3)))
219 (define-public python-pytest-filter-subpackage
221 (name "python-pytest-filter-subpackage")
226 (uri (pypi-uri "pytest-filter-subpackage" version))
228 (base32 "1s4s2kd31yc65rfvl4xhy8xx806xhy59kc7668h6b6wq88xgrn5p"))))
229 (build-system python-build-system)
231 '(;; One test is failing. There's an issue reported upstream. See
232 ;; https://github.com/astropy/pytest-filter-subpackage/issues/3.
233 ;; Disable it for now.
235 (modify-phases %standard-phases
237 (lambda* (#:key inputs outputs #:allow-other-keys)
238 ;; Make the installed plugin discoverable by Pytest.
239 (add-installed-pythonpath inputs outputs)
240 (invoke "pytest" "-vv" "-k" "not test_with_rst"))))))
242 `(("python-pytest" ,python-pytest)
243 ("python-pytest-cov" ,python-pytest-cov)
244 ("python-pytest-doctestplus"
245 ,python-pytest-doctestplus)))
246 (home-page "https://github.com/astropy/pytest-filter-subpackage")
247 (synopsis "Pytest plugin for filtering based on sub-packages")
249 "This package contains a simple plugin for the pytest framework that
250 provides a shortcut to testing all code and documentation for a given
252 (license license:bsd-3)))
254 (define-public python-pytest-openfiles
256 (name "python-pytest-openfiles")
261 (uri (pypi-uri "pytest-openfiles" version))
263 (base32 "0n0a7fdc9m86360y96l23fvdmd6rw04bl6h5xqgl9qxfv08jk70p"))))
264 (build-system python-build-system)
267 (modify-phases %standard-phases
269 (lambda* (#:key inputs outputs #:allow-other-keys)
270 ;; Make the installed plugin discoverable by Pytest.
271 (add-installed-pythonpath inputs outputs)
272 (invoke "pytest" "-vv"))))))
274 `(("python-setuptools-scm" ,python-setuptools-scm)
275 ("python-pytest" ,python-pytest)))
277 `(("python-psutil" ,python-psutil)))
278 (home-page "https://github.com/astropy/pytest-openfiles")
279 (synopsis "Pytest plugin for detecting inadvertent open file handles")
281 "This package provides a plugin for the pytest framework that allows
282 developers to detect whether any file handles or other file-like objects
283 were inadvertently left open at the end of a unit test.")
284 (license license:bsd-3)))
286 (define-public python-pytest-remotedata
288 (name "python-pytest-remotedata")
293 (uri (pypi-uri "pytest-remotedata" version))
295 (base32 "1h6g6shib6z07azf12rnsa053470ggbd7hy3bnbw8nf3nza5h372"))))
296 (build-system python-build-system)
299 (modify-phases %standard-phases
301 (lambda* (#:key inputs outputs #:allow-other-keys)
302 ;; Make the installed plugin discoverable by Pytest.
303 (add-installed-pythonpath inputs outputs)
304 (invoke "pytest" "-vv" "-k"
306 ;; These tests require internet access. Disable them.
307 "not test_default_behavior"
308 " and not test_strict_with_decorator")))))))
310 `(("python-pytest" ,python-pytest)))
312 `(("python-six" ,python-six)))
313 (home-page "https://github.com/astropy/pytest-remotedata")
314 (synopsis "Pytest plugin for controlling remote data access")
316 "This package provides a plugin for the Pytest framework that allows
317 developers to control unit tests that require access to data from the
319 (license license:bsd-3)))
321 (define-public python-pytest-mpl
323 (name "python-pytest-mpl")
328 (uri (pypi-uri "pytest-mpl" version))
330 (base32 "1km202c1s5kcn52fx0266p06qb34va3warcby594dh6vixxa9i96"))))
331 (build-system python-build-system)
334 (modify-phases %standard-phases
337 (invoke "pytest" "-vv"))))))
339 `(("python-pytest" ,python-pytest)))
341 `(("python-matplotlib" ,python-matplotlib)
342 ("python-pillow" ,python-pillow)))
343 (home-page "https://github.com/matplotlib/pytest-mpl")
344 (synopsis "Pytest plugin to help with testing figures output from Matplotlib")
346 "This is a plugin to facilitate image comparison for Matplotlib figures
348 (license license:bsd-3)))
350 (define-public python-covdefaults
352 (name "python-covdefaults")
356 ;; The PyPI tarball does not include tests.
359 (url "https://github.com/asottile/covdefaults")
360 (commit (string-append "v" version))))
361 (file-name (git-file-name name version))
363 (base32 "11a24c0wzv01n55fy4kdpnyqna4m9k0mp58kmhiaks34xw4k37hq"))))
364 (build-system python-build-system)
367 (modify-phases %standard-phases
370 (invoke "pytest" "-vv"))))))
372 `(("python-coverage" ,python-coverage)
373 ("python-pytest" ,python-pytest)))
374 (home-page "https://github.com/asottile/covdefaults")
375 (synopsis "Coverage plugin to provide opinionated default settings")
377 "Covdefaults is a coverage plugin to provide opinionated default
379 (license license:expat)))
381 (define-public python-pytest-vcr
382 ;; This commit fixes integration with pytest-5
383 (let ((commit "4d6c7b3e379a6a7cba0b8f9d20b704dc976e9f05")
386 (name "python-pytest-vcr")
387 (version (git-version "1.0.2" revision commit))
392 (url "https://github.com/ktosiek/pytest-vcr")
394 (file-name (git-file-name name version))
397 "1yk988zi0la6zpcm3fff0mxf942di2jiymrfqas19nyngj5ygaqs"))))
398 (build-system python-build-system)
401 (modify-phases %standard-phases
403 (lambda* (#:key inputs outputs #:allow-other-keys)
404 (add-installed-pythonpath inputs outputs)
405 (invoke "pytest" "tests/"))))))
407 `(("python-pytest" ,python-pytest)
408 ("python-vcrpy" ,python-vcrpy)))
409 (home-page "https://github.com/ktosiek/pytest-vcr")
410 (synopsis "Plugin for managing VCR.py cassettes")
412 "Plugin for managing VCR.py cassettes.")
413 (license license:expat))))
415 (define-public python-pytest-checkdocs
417 (name "python-pytest-checkdocs")
422 (uri (pypi-uri "pytest-checkdocs" version))
424 (base32 "0j6j1gvj6x451y3qsx4xbaq9p1w9gg3mwk7n0w80cy8vdyjkngb0"))))
425 (build-system python-build-system)
427 `(("python-docutils" ,python-docutils)
428 ("python-importlib-metadata" ,python-importlib-metadata)
429 ("python-more-itertools" ,python-more-itertools)))
431 `(("python-setuptools-scm" ,python-setuptools-scm)))
432 (home-page "https://github.com/jaraco/pytest-checkdocs")
433 (synopsis "Check the README when running tests")
435 "This package provides a pytest plugin that checks the long description
436 of the project to ensure it renders properly.")
437 (license license:expat)))
439 (define-public python-pytest-trio
441 (name "python-pytest-trio")
446 (uri (pypi-uri "pytest-trio" version))
448 (base32 "1zm8didm9h5jkqhghl9bvqs7kr7sjci282c7grhk6yhpzn8a9w4v"))))
449 (build-system python-build-system)
452 (modify-phases %standard-phases
454 (lambda* (#:key inputs outputs #:allow-other-keys)
455 (add-installed-pythonpath inputs outputs)
456 (invoke "pytest" "-W" "error" "-ra" "-v" "--pyargs"
457 "pytest_trio" "--verbose" "--cov"))))))
459 `(("python-hypothesis" ,python-hypothesis)
460 ("python-pytest" ,python-pytest)
461 ("python-pytest-cov" ,python-pytest-cov)))
463 `(("python-trio" ,python-trio)))
464 (home-page "https://github.com/python-trio/pytest-trio")
465 (synopsis "Pytest plugin for trio")
467 "This is a pytest plugin to help you test projects that use Trio, a
468 friendly library for concurrency and async I/O in Python.")
469 ;; Either license applies.
470 (license (list license:expat license:asl2.0))))
472 (define-public python-pytest-flake8
474 (name "python-pytest-flake8")
479 (uri (pypi-uri "pytest-flake8" version))
482 "09vhn7r77s1yiqnlwfvh5585f904zpyd6620a90dpccfr1cbp0hv"))))
483 (build-system python-build-system)
485 `(("python-flake8" ,python-flake8)))
487 `(("python-pytest" ,python-pytest)))
488 (home-page "https://github.com/tholo/pytest-flake8")
489 (synopsis "Pytest plugin to check FLAKE8 requirements")
491 "This package provides a pytest plugin for efficiently checking PEP8
493 (license license:bsd-3)))
495 (define-public python-pytest-isort
497 (name "python-pytest-isort")
502 (uri (pypi-uri "pytest-isort" version))
504 (base32 "06myn5hhxs5yp8dqr1yjsgcnnxnsrvsqannm00bvaw0qml6ydzjb"))))
505 (build-system python-build-system)
508 (modify-phases %standard-phases
512 (string-append (getcwd) ":"
513 (getenv "PYTHONPATH")))
514 (invoke "pytest"))))))
516 `(("python-isort" ,python-isort)
517 ("python-pytest" ,python-pytest)))
518 (home-page "https://github.com/moccu/pytest-isort/")
519 (synopsis "Pytest plugin to check import ordering using isort")
521 "This package provides a pytest plugin to check import ordering using
523 (license license:bsd-3)))
525 (define-public python-pytest-shutil
527 (name "python-pytest-shutil")
532 (uri (pypi-uri "pytest-shutil" version))
535 "0q8j0ayzmnvlraml6i977ybdq4xi096djhf30n2m1rvnvrhm45nq"))))
536 (build-system python-build-system)
539 (modify-phases %standard-phases
540 (add-after 'unpack 'patch-tests
543 (substitute* "tests/integration/test_cmdline_integration.py"
544 (("dirname = '/bin'")
545 "dirname = '/tmp/bin'")
546 (("bindir = os.path.realpath\\('/bin'\\)")
547 "bindir = os.path.realpath('/tmp/bin')"))
550 `(("python-contextlib2" ,python-contextlib2)
551 ("python-execnet" ,python-execnet)
552 ("python-pathpy" ,python-pathpy)
553 ("python-termcolor" ,python-termcolor)))
555 `(("python-mock" ,python-mock)
556 ("python-pytest" ,python-pytest)
557 ("python-setuptools-git" ,python-setuptools-git)))
558 (home-page "https://github.com/manahl/pytest-plugins")
559 (synopsis "Assorted shell and environment tools for py.test")
561 "This package provides assorted shell and environment tools for the
562 py.test testing framework.")
563 (license license:expat)))
565 (define-public python-pytest-fixture-config
567 (name "python-pytest-fixture-config")
572 (uri (pypi-uri "pytest-fixture-config" version))
575 "13i1qpz22w3x4dmw8vih5jdnbqfqvl7jiqs0dg764s0zf8bp98a1"))))
576 (build-system python-build-system)
578 `(("python-pytest" ,python-pytest)
579 ("python-setuptools-git" ,python-setuptools-git)))
580 (home-page "https://github.com/manahl/pytest-plugins")
581 (synopsis "Fixture configuration utils for py.test")
583 "This package provides fixture configuration utilities for the py.test
585 (license license:expat)))
587 (define-public python-pytest-virtualenv
589 (name "python-pytest-virtualenv")
594 (uri (pypi-uri "pytest-virtualenv" version))
597 "03w2zz3crblj1p6i8nq17946hbn3zqp9z7cfnifw47hi4a4fww12"))))
598 (build-system python-build-system)
601 (modify-phases %standard-phases
602 ;; Reference the virtualenv executable directly, to avoid the need
603 ;; for PYTHONPATH, which gets cleared when instantiating a new
604 ;; virtualenv with pytest-virtualenv.
605 (add-after 'unpack 'patch-virtualenv-executable
606 (lambda* (#:key inputs #:allow-other-keys)
607 (let* ((virtualenv (assoc-ref inputs "python-virtualenv"))
608 (virtualenv-bin (string-append virtualenv
610 (substitute* "pytest_virtualenv.py"
611 (("^DEFAULT_VIRTUALENV_FIXTURE_EXECUTABLE.*$")
612 (format #f "DEFAULT_VIRTUALENV_FIXTURE_EXECUTABLE = '~a'"
616 `(("python-pytest-shutil" ,python-pytest-shutil)
617 ("python-pytest-fixture-config" ,python-pytest-fixture-config)))
619 `(("python-virtualenv" ,python-virtualenv)))
621 `(("python-mock" ,python-mock)
622 ("python-pytest" ,python-pytest)
623 ("python-setuptools-git" ,python-setuptools-git)))
624 (home-page "https://github.com/manahl/pytest-plugins")
625 (synopsis "Virtualenv fixture for py.test")
626 (description "This package provides a virtualenv fixture for the py.test
628 (license license:expat)))
630 (define-public python-pytest-pycodestyle
632 (name "python-pytest-pycodestyle")
633 (version "2.0.0") ;later versions require python-pytest~=5.4
637 (uri (pypi-uri "pytest-pycodestyle" version))
640 "02i5gl7pm9cwxk15sn29inz3n8flpj1r3p1l110h43f2na5w8h7z"))))
641 (build-system python-build-system)
643 `(("python-pycodestyle" ,python-pycodestyle)))
645 `(("python-pytest" ,python-pytest)))
646 (home-page "https://github.com/henry0312/pytest-pycodestyle")
647 (synopsis "Pytest plugin to run pycodestyle")
648 (description "This package provides a plugin to run @code{pycodestyle}
649 for the @code{pytest} framework.")
650 (license license:expat)))
652 (define-public python-pytest-benchmark
654 (name "python-pytest-benchmark")
659 (uri (pypi-uri "pytest-benchmark" version))
662 "0a4mpb4j73dsyk47hd1prrjpfk4r458s102cn80rf253jg818hxd"))))
663 (build-system python-build-system)
665 `(("python-py-cpuinfo" ,python-py-cpuinfo)))
667 `(("python-pathlib2" ,python-pathlib2)
668 ("python-pytest" ,python-pytest)))
669 (home-page "https://github.com/ionelmc/pytest-benchmark")
670 (synopsis "Pytest fixture for benchmarking code")
672 "This package provides a pytest fixture that will group the tests into
673 rounds that are calibrated to the chosen timer.")
674 (license license:bsd-2)))
676 (define-public python-pytest-services
678 (name "python-pytest-services")
683 (uri (pypi-uri "pytest-services" version))
686 "0b2zfv04w6m3gp2v44ifdhx22vcji069qnn95ry3zcyxib7cjnq3"))))
687 (build-system python-build-system)
688 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
690 `(("python-psutil" ,python-psutil)
691 ("python-requests" ,python-requests)))
693 `(("python-pytest" ,python-pytest)))
694 (home-page "https://github.com/pytest-dev/pytest-services")
695 (synopsis "Services plugin for pytest testing framework")
697 "This plugin provides a set of fixtures and utility functions to start
698 service processes for your tests with pytest.")
699 (license license:expat)))
701 (define-public python-pytest-toolbox
703 (name "python-pytest-toolbox")
707 ;; No tests in the PyPI tarball.
710 (url "https://github.com/samuelcolvin/pytest-toolbox")
711 (commit (string-append "v" version))))
712 (file-name (git-file-name name version))
714 (base32 "1wqkr3g5gmqdxmhzfsxbwy8pm3cadaj6a8cxq58w9bacly4hqbh0"))))
715 (build-system python-build-system)
718 (modify-phases %standard-phases
720 (lambda* (#:key inputs outputs #:allow-other-keys)
721 ;; Make the installed plugin discoverable by Pytest.
722 (add-installed-pythonpath inputs outputs)
723 (invoke "pytest" "-vv"))))))
725 `(("python-coverage" ,python-coverage)
726 ("python-docutils" ,python-docutils)
727 ("python-flake8" ,python-flake8)
728 ("python-isort" ,python-isort)
729 ("python-pydantic" ,python-pydantic)
730 ("python-pyflakes" ,python-pyflakes)
731 ("python-pygments" ,python-pygments)
732 ("python-pytest" ,python-pytest)
733 ("python-pytest-cov" ,python-pytest-cov)
734 ("python-pytest-isort" ,python-pytest-isort)
735 ("python-pytest-mock" ,python-pytest-mock)
736 ("python-pytest-sugar" ,python-pytest-sugar)))
737 (home-page "https://github.com/samuelcolvin/pytest-toolbox")
738 (synopsis "Numerous useful plugins for Pytest")
740 "Pytest Toolbox contains many useful plugins for Pytest. Among them are
741 new fixtures, new methods and new comparison objects.")
742 (license license:expat)))
744 (define-public python-pytest-aiohttp
746 (name "python-pytest-aiohttp")
751 (uri (pypi-uri "pytest-aiohttp" version))
754 "0kx4mbs9bflycd8x9af0idcjhdgnzri3nw1qb0vpfyb3751qaaf9"))))
755 (build-system python-build-system)
757 `(("python-pytest" ,python-pytest)))
759 `(("python-aiohttp" ,python-aiohttp)))
760 (home-page "https://github.com/aio-libs/pytest-aiohttp/")
761 (synopsis "Pytest plugin for aiohttp support")
762 (description "This package provides a pytest plugin for aiohttp support.")
763 (license license:asl2.0)))
765 (define-public python-nbval
767 (name "python-nbval")
772 (uri (pypi-uri "nbval" version))
774 (base32 "0h3xrnw0mj1srigrx2rfnd73h8s0xjycclmjs0vx7qkfyqpcvvyg"))))
775 (build-system python-build-system)
778 (modify-phases %standard-phases
779 (add-before 'check 'fix-test
781 ;; This test fails because of a mismatch in the output of LaTeX
782 ;; equation environments. Seems OK to skip.
783 (delete-file "tests/ipynb-test-samples/test-latex-pass-correctouput.ipynb")
786 (lambda* (#:key inputs outputs #:allow-other-keys)
787 (add-installed-pythonpath inputs outputs)
788 (invoke "pytest" "-vv" "-k"
790 ;; This only works with Pytest < 5.
791 "not nbdime_reporter"
792 ;; https://github.com/computationalmodelling/nbval/pull/148.
793 " and not test_timeouts")))))))
795 `(("python-pytest" ,python-pytest)
796 ("python-pytest-cov" ,python-pytest-cov)
797 ("python-sympy" ,python-sympy)))
799 `(("python-ipykernel" ,python-ipykernel)
800 ("python-jupyter-client" ,python-jupyter-client)
801 ("python-nbformat" ,python-nbformat)
802 ("python-six" ,python-six)))
803 (home-page "https://github.com/computationalmodelling/nbval")
804 (synopsis "Pytest plugin to validate Jupyter notebooks")
806 "This plugin adds functionality to Pytest to recognise and collect Jupyter
807 notebooks. The intended purpose of the tests is to determine whether execution
808 of the stored inputs match the stored outputs of the @file{.ipynb} file. Whilst
809 also ensuring that the notebooks are running without errors.")
810 (license license:bsd-3)))
812 (define-public python-pytest-flask
814 (name "python-pytest-flask")
819 (uri (pypi-uri "pytest-flask" version))
822 "1hln7mwgdzfi5ma0kqfsi768l7p24jhkw8l0imhifwy08nh7hmjd"))))
823 (build-system python-build-system)
825 `(("python-flask" ,python-flask)
826 ("python-pytest" ,python-pytest)
827 ("python-setuptools-scm" ,python-setuptools-scm)
828 ("python-werkzeug" ,python-werkzeug)))
829 (home-page "https://github.com/pytest-dev/pytest-flask")
830 (synopsis "Pytest fixtures to test Flask applications")
832 "This pytest plugin provides fixtures to simplify Flask app testing.")
833 (license license:expat)))
835 (define-public python-pytest-env
837 (name "python-pytest-env")
842 (uri (pypi-uri "pytest-env" version))
844 (base32 "1hl0ln0cicdid4qjk7mv90lw9xkb0v71dlj7q7rn89vzxxm9b53y"))))
845 (build-system python-build-system)
847 `(("python-pytest" ,python-pytest)))
848 (home-page "https://github.com/MobileDynasty/pytest-env")
849 (synopsis "Pytest plugin that allows you to add environment variables")
851 "This is a @code{py.test} plugin that enables you to set environment
852 variables in the @file{pytest.ini} file.")
853 (license license:expat)))
855 (define-public python-codacy-coverage
857 (name "python-codacy-coverage")
862 (uri (pypi-uri "codacy-coverage" version))
865 "1g0c0w56xdkmqb8slacyw5qhzrkp814ng3ddh2lkiij58y9m2imr"))))
866 (build-system python-build-system)
868 `(#:tests? #f)); no tests
870 `(("python-check-manifest" ,python-check-manifest)))
871 (home-page "https://github.com/codacy/python-codacy-coverage")
872 (synopsis "Codacy coverage reporter for Python")
873 (description "This package analyses Python test suites and reports how much
874 of the code is covered by them. This tool is part of the Codacy suite for
875 analysing code quality.")
876 (license license:expat)))
878 (define-public python-httmock
880 (name "python-httmock")
885 (uri (pypi-uri "httmock" version))
888 "1zj1fcm0n6f0wr9mr0hmlqz9430fnr5cdwd5jkcvq9j44bnsrfz0"))))
889 (build-system python-build-system)
891 `(#:tests? #f)); no tests
893 `(("python-requests" ,python-requests)))
894 (home-page "https://github.com/patrys/httmock")
895 (synopsis "Mocking library for requests.")
896 (description "This package provides a library for replying fake data to
897 Python software under test, when they make an HTTP query.")
898 (license license:asl2.0)))
900 (define-public python-atpublic
902 (name "python-atpublic")
907 (uri (pypi-uri "atpublic" version))
910 "0i3sbxkdlbb4560rrlmwwd5y4ps7k73lp4d8wnmd7ag9k426gjkx"))))
911 (build-system python-build-system)
914 (modify-phases %standard-phases
915 (add-before 'build 'enable-c-implementation
917 (setenv "ATPUBLIC_BUILD_EXTENSION" "yes")
921 (invoke "python" "-m" "nose2" "-v"))))))
923 `(("python-nose2" ,python-nose2)))
924 (home-page "https://public.readthedocs.io/")
925 (synopsis "@code{@@public} decorator for populating @code{__all__}")
927 "This Python module adds a @code{@@public} decorator and function which
928 populates a module's @code{__all__} and optionally the module globals. With
929 it, the declaration of a name's public export semantics are not separated from
930 the implementation of that name.")
931 (license (list license:asl2.0
932 license:lgpl3)))) ; only for setup_helpers.py
934 (define-public python-mypy-extensions
936 (name "python-mypy-extensions")
941 (uri (pypi-uri "mypy_extensions" version))
944 "1a04qsk8hd1lqns8w1j7cr0vmvbhg450di5k1i16kqxkbf7q30id"))))
945 (build-system python-build-system)
946 (arguments `(#:tests? #f)); no tests
947 (home-page "https://github.com/python/mypy_extensions")
948 (synopsis "Experimental extensions for MyPy")
949 (description "The @code{python-mypy-extensions} module defines
950 experimental extensions to the standard @code{typing} module that are
951 supported by the MyPy typechecker.")
952 (license license:expat)))
954 (define-public python-mypy
961 (uri (pypi-uri "mypy" version))
964 "030kn709515452n6gy2i1d9fg6fyrkmdz228lfpmbslybsld9xzg"))))
965 (build-system python-build-system)
968 (modify-phases %standard-phases
971 (invoke "./runtests.py")
974 `(("python-attrs" ,python-attrs)
975 ("python-flake8" ,python-flake8)
976 ("python-flake8-bugbear" ,python-flake8-bugbear)
977 ("python-flake8-pyi" ,python-flake8-pyi)
978 ("python-importlib-metadata" ,python-importlib-metadata)
979 ("python-lxml" ,python-lxml)
980 ("python-psutil" ,python-psutil)
981 ("python-py" ,python-py)
982 ("python-pytest" ,python-pytest)
983 ("python-pytest-cov" ,python-pytest-cov)
984 ("python-pytest-forked" ,python-pytest-forked)
985 ("python-pytest-xdist" ,python-pytest-xdist)
986 ("python-virtualenv" ,python-virtualenv)))
988 `(("python-mypy-extensions" ,python-mypy-extensions)
989 ("python-typing-extensions" ,python-typing-extensions)
990 ("python-typed-ast" ,python-typed-ast)))
991 (home-page "http://www.mypy-lang.org/")
992 (synopsis "Static type checker for Python")
993 (description "Mypy is an optional static type checker for Python that aims
994 to combine the benefits of dynamic (or 'duck') typing and static typing. Mypy combines
995 the expressive power and convenience of Python with a powerful type system and
996 compile-time type checking. Mypy type checks standard Python programs; run them using
997 any Python VM with basically no runtime overhead.")
998 ;; Most of the code is under MIT license; Some files are under Python Software
999 ;; Foundation License version 2: stdlib-samples/*, mypyc/lib-rt/pythonsupport.h and
1000 ;; mypyc/lib-rt/getargs.c
1001 (license (list license:expat license:psfl))))