projects/guix·blob mpd-fix-groups · refs

4877 lines · 174.8 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015, 2017 Cyril Roelandt <[email protected]>
3;;; Copyright © 2015, 2019, 2020, 2021 Efraim Flashner <[email protected]>
4;;; Copyright © 2016-2022 Marius Bakke <[email protected]>
5;;; Copyright © 2016 宋文武 <[email protected]>
6;;; Copyright © 2017 Muriithi Frederick Muriuki <[email protected]>
7;;; Copyright © 2017 Thomas Danckaert <[email protected]>
8;;; Copyright © 2018 Fis Trivial <[email protected]>
9;;; Copyright © 2018-2020 Tobias Geerinckx-Rice <[email protected]>
10;;; Copyright © 2019-2025 Ricardo Wurmus <[email protected]>
11;;; Copyright © 2019-2024 Maxim Cournoyer <[email protected]>
12;;; Copyright © 2019, 2021, 2025 Hartmut Goebel <[email protected]>
13;;; Copyright © 2020, 2022 Julien Lepiller <[email protected]>
14;;; Copyright © 2020 Matthew James Kraai <[email protected]>
15;;; Copyright © 2020 Edouard Klein <[email protected]>
16;;; Copyright © 2020, 2021, 2025 Vinicius Monego <[email protected]>
17;;; Copyright © 2020 Tanguy Le Carrour <[email protected]>
18;;; Copyright © 2021-2025 Sharlatan Hellseher <[email protected]>
19;;; Copyright © 2021 Brendan Tildesley <[email protected]>
20;;; Copyright © 2021 Giacomo Leidi <[email protected]>
21;;; Copyright © 2021, 2022 Guillaume Le Vaillant <[email protected]>
22;;; Copyright © 2021 Bonface Munyoki Kilyungi <[email protected]>
23;;; Copyright © 2021 Sebastian Gibb <[email protected]>
24;;; Copyright © 2022 Malte Frank Gerdes <[email protected]>
25;;; Copyright © 2022 Felix Gruber <[email protected]>
26;;; Copyright © 2022 Tomasz Jeneralczyk <[email protected]>
27;;; Copyright © 2022 jgart <[email protected]>
28;;; Copyright © 2023 John Kehayias <[email protected]>
29;;; Copyright © 2024 Danny Milosavljevic <[email protected]>
30;;; Copyright © 2024-2025 Troy Figiel <[email protected]>
31;;; Copyright © 2024 Navid Afkhami <[email protected]>
32;;; Copyright © 2024, 2025 David Elsing <[email protected]>
33;;; Copyright © 2024 Eric Bavier <[email protected]>
34;;; Copyright © 2024 Markku Korkeala <[email protected]>
35;;; Copyright © 2024 Vincent Prat <[email protected]>
36;;; Copyright © 2025 Evgeny Pisemsky <[email protected]>
37;;; Copyright © 2025 Florent Pruvost <[email protected]>
38;;; Copyright © 2025 Matthew Elwin <[email protected]>
39;;; Copyright © 2025 Nicolas Graves <[email protected]>
40;;; Copyright © 2025 Sergio Pastor Pérez <[email protected]>
41;;; Copyright © 2025 Zheng Junjie <[email protected]>
42;;;
43;;; This file is part of GNU Guix.
44;;;
45;;; GNU Guix is free software; you can redistribute it and/or modify it
46;;; under the terms of the GNU General Public License as published by
47;;; the Free Software Foundation; either version 3 of the License, or (at
48;;; your option) any later version.
49;;;
50;;; GNU Guix is distributed in the hope that it will be useful, but
51;;; WITHOUT ANY WARRANTY; without even the implied warranty of
52;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53;;; GNU General Public License for more details.
54;;;
55;;; You should have received a copy of the GNU General Public License
56;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
57
58(define-module (gnu packages python-check)
59 #:use-module (gnu packages)
60 #:use-module (gnu packages admin)
61 #:use-module (gnu packages base)
62 #:use-module (gnu packages bash)
63 #:use-module (gnu packages cmake)
64 #:use-module (gnu packages nss)
65 #:use-module (gnu packages check)
66 #:use-module (gnu packages django)
67 #:use-module (gnu packages jupyter)
68 #:use-module (gnu packages maths)
69 #:use-module (gnu packages mpi)
70 #:use-module (gnu packages ninja)
71 #:use-module (gnu packages openstack)
72 #:use-module (gnu packages perl)
73 #:use-module (gnu packages python-build)
74 #:use-module (gnu packages python-science)
75 #:use-module (gnu packages python-web)
76 #:use-module (gnu packages python-xyz)
77 #:use-module (gnu packages qt)
78 #:use-module (gnu packages sphinx)
79 #:use-module (gnu packages time)
80 #:use-module (gnu packages version-control)
81 #:use-module (gnu packages web)
82 #:use-module (gnu packages xml)
83 #:use-module (gnu packages xdisorg)
84 #:use-module (gnu packages xorg)
85 #:use-module ((guix licenses) #:prefix license:)
86 #:use-module (guix build-system pyproject)
87 #:use-module (guix build-system python)
88 #:use-module (guix deprecation)
89 #:use-module (guix download)
90 #:use-module (guix gexp)
91 #:use-module (guix git-download)
92 #:use-module (guix packages)
93 #:use-module (guix utils))
94
95(define-public python-aioresponses
96 (package
97 (name "python-aioresponses")
98 (version "0.7.2")
99 (source
100 (origin
101 (method git-fetch)
102 (uri (git-reference
103 (url "https://github.com/pnuckowski/aioresponses")
104 (commit version)))
105 (file-name (git-file-name name version))
106 (sha256
107 (base32 "0fcm1rl1h91c2ca446kl5r2q229a8cfad2xn9gmsmdvn29wm35kc"))))
108 (build-system pyproject-build-system)
109 (arguments
110 (list
111 #:test-flags
112 #~(list
113 "tests" "-k"
114 (string-append
115 ;; These tests require network access.
116 "not test_address_as_instance_of_url_combined_with_pass_through "
117 "and not test_pass_through_with_origin_params"))
118 #:phases
119 #~(modify-phases %standard-phases
120 (add-before 'build 'set-pbr-version
121 (lambda _
122 (setenv "PBR_VERSION" #$version))))))
123 (native-inputs (list python-pbr python-ddt python-pytest python-setuptools))
124 (propagated-inputs (list python-aiohttp))
125 (home-page "https://github.com/pnuckowski/aioresponses")
126 (synopsis "Mock out requests made by ClientSession from aiohttp package")
127 (description
128 "Aioresponses is a helper to mock/fake web requests in python aiohttp
129package. For requests module there are a lot of packages that help us with
130testing (eg. httpretty, responses, requests-mock). When it comes to testing
131asynchronous HTTP requests it is a bit harder (at least at the beginning).
132The purpose of this package is to provide an easy way to test asynchronous
133HTTP requests.")
134 (license license:expat)))
135
136(define-public python-allpairspy
137 (package
138 (name "python-allpairspy")
139 (version "2.5.1")
140 (source
141 (origin
142 (method url-fetch)
143 (uri (pypi-uri "allpairspy" version))
144 (sha256
145 (base32 "1zh983y9k5idna677vsjlfxlzm1dfff3w1n63sfi3vkfnnik37gn"))))
146 (build-system pyproject-build-system)
147 (native-inputs
148 (list python-pytest
149 python-setuptools))
150 (home-page "https://github.com/thombashi/allpairspy")
151 (synopsis "Pairwise test combinations generator")
152 (description
153 "This is a Python library for test combinations generator. The generator
154allows one to create a set of tests using @emph{pairwise combinations} method,
155reducing a number of combinations of variables into a lesser set that covers
156most situations.")
157 (license license:expat)))
158
159(define-public python-approval-utilities
160 (package
161 (name "python-approval-utilities")
162 (version "15.3.2")
163 (source
164 (origin
165 (method git-fetch)
166 (uri (git-reference
167 (url "https://github.com/approvals/ApprovalTests.Python")
168 (commit (string-append "v" version))))
169 (file-name (git-file-name name version))
170 (sha256
171 (base32 "0mkvrx252xc140n4rrvgbqc1hrlw1gq7nx5hr1z4rxkaxvr8prkh"))))
172 (build-system pyproject-build-system)
173 (arguments
174 (list
175 #:tests? #f ; Tests are run in the python-approvaltests package.
176 #:phases
177 #~(modify-phases %standard-phases
178 (add-after 'unpack 'setup
179 (lambda _
180 (rename-file "setup/setup.approval_utilities.py"
181 "setup.py")
182 (substitute* "setup.py"
183 (("from setup_utils import get_version")
184 "")
185 (("version=get_version\\(\\),")
186 (format #f "version=~s," #$version))))))))
187 (native-inputs (list python-setuptools))
188 (home-page "https://github.com/approvals/ApprovalTests.Python")
189 (synopsis "Utilities for @code{python-approvaltests}")
190 (description
191 "This package provides utilities for production code that work well with
192@code{python-approvaltests}.")
193 (license license:asl2.0)))
194
195(define-public python-approvaltests
196 (package/inherit python-approval-utilities
197 (name "python-approvaltests")
198 (version (package-version python-approval-utilities))
199 (arguments
200 (list
201 #:tests? #f ; Tests are run in the python-approvaltests package.
202 #:phases
203 #~(modify-phases %standard-phases
204 (add-after 'unpack 'chdir
205 (lambda _
206 (substitute* "setup/setup_utils.py"
207 (("version=get_version\\(\\),")
208 (format #f "version=~s," #$version))
209 (("\\(get_parent_directory\\(\\)\\.parent / ")
210 "Path("))
211 (rename-file "setup/setup.py"
212 "setup.py")
213 ;; Assume the chdir.
214 (substitute* "setup.py"
215 (("\\.\\.")
216 "."))
217 (rename-file "setup/setup_utils.py"
218 "setup_utils.py"))))))
219 (native-inputs (list python-setuptools))
220 (propagated-inputs
221 (list python-allpairspy
222 python-approval-utilities
223 python-beautifulsoup4
224 python-empty-files
225 python-mock
226 python-pyperclip
227 python-pytest
228 python-testfixtures
229 python-typing-extensions))
230 (home-page "https://github.com/approvals/ApprovalTests.Python")
231 (synopsis "Assertion/verification library to aid testing")
232 (description
233 "This package provides tools verify objects that require more than a
234simple assert including long strings, large arrays, and complex hash
235structures and objects, i.e. when you need a more granular look at the test
236failure.")
237 (license license:asl2.0)))
238
239(define-public python-assay
240 ;; No release yet.
241 (let ((commit "74617d70e77afa09f58b3169cf496679ac5d5621")
242 (revision "0"))
243 (package
244 (name "python-assay")
245 (version (git-version "0.0.0" revision commit))
246 (source
247 (origin
248 (method git-fetch)
249 (uri (git-reference
250 (url "https://github.com/brandon-rhodes/assay")
251 (commit commit)))
252 (file-name (git-file-name name version))
253 (sha256
254 (base32 "1klxmamj88mn0q348r08zksccgsbch8sp0m4b04s3myrqnslp2nd"))))
255 (build-system pyproject-build-system)
256 (arguments
257 (list
258 #:test-flags #~(list "-m" "assay.tests")
259 #:phases
260 #~(modify-phases %standard-phases
261 (replace 'check
262 (lambda* (#:key tests? test-flags #:allow-other-keys)
263 (when tests?
264 (apply invoke "python" test-flags)))))))
265 (native-inputs
266 (list python-setuptools python-wheel))
267 (home-page "https://github.com/brandon-rhodes/assay")
268 (synopsis "Python testing framework")
269 (description
270 "This package provides opiniotated Python test framework prototype.")
271 (license license:expat))))
272
273(define-public python-assertpy
274 (package
275 (name "python-assertpy")
276 (version "1.1")
277 (source
278 (origin
279 (method git-fetch) ;no tests in PyPI distribution
280 (uri (git-reference
281 (url "https://github.com/assertpy/assertpy")
282 (commit version)))
283 (file-name (git-file-name name version))
284 (sha256
285 (base32 "0hnfh45cmqyp7zasrllwf8gbq3mazqlhhk0sq1iqlh6fig0yfq2f"))))
286 (build-system pyproject-build-system)
287 (native-inputs (list python-pytest python-setuptools))
288 (home-page "https://github.com/assertpy/assertpy")
289 (synopsis "Simple assertion library for unit testing")
290 (description
291 "This package provides a simple assertion library for unit testing in
292Python with a fluent API.")
293 (license license:bsd-3)))
294
295(define-public python-atpublic
296 (package
297 (name "python-atpublic")
298 (version "3.1.1")
299 (source
300 (origin
301 (method url-fetch)
302 (uri (pypi-uri "atpublic" version))
303 (sha256
304 (base32
305 "060v2b5jfn7p99j09amxlb6w9ynwbq7fix31kl0caz0hs09fx61h"))))
306 (build-system pyproject-build-system)
307 (arguments (list #:build-backend "pdm.backend"))
308 (native-inputs
309 (list python-pytest python-pdm-backend python-sybil python-pytest-cov))
310 (home-page "https://public.readthedocs.io/")
311 (synopsis "@code{@@public} decorator for populating @code{__all__}")
312 (description
313 "This Python module adds a @code{@@public} decorator and function which
314populates a module's @code{__all__} and optionally the module globals. With
315it, the declaration of a name's public export semantics are not separated from
316the implementation of that name.")
317 (license (list license:asl2.0
318 license:lgpl3)))) ; only for setup_helpers.py
319
320(define-public python-autopep8
321 (package
322 (name "python-autopep8")
323 (version "2.3.2")
324 (source
325 (origin
326 (method url-fetch)
327 (uri (pypi-uri "autopep8" version))
328 (sha256
329 (base32 "0n0pjdk39n6vlddjqvbpkxd4a7q33dkf0k2yk6dbd5wijr7hli49"))))
330 (build-system pyproject-build-system)
331 (propagated-inputs
332 (list python-pycodestyle python-tomli))
333 (native-inputs
334 (list python-setuptools))
335 (arguments
336 `(#:phases
337 (modify-phases %standard-phases
338 (add-before 'check 'prepare-check
339 (lambda _
340 (setenv "HOME" "/tmp"))))))
341 (home-page "https://github.com/hhatto/autopep8")
342 (synopsis "Format Python code according to the PEP 8 style guide")
343 (description
344 "@code{autopep8} automatically formats Python code to conform to
345the PEP 8 style guide. It uses the pycodestyle utility to determine
346what parts of the code needs to be formatted. @code{autopep8} is
347capable of fixing most of the formatting issues that can be reported
348by pycodestyle.")
349 (license (license:non-copyleft
350 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
351
352(define-public python-avocado-framework
353 (package
354 (name "python-avocado-framework")
355 (version "96.0")
356 (source
357 (origin
358 (method url-fetch)
359 (uri (pypi-uri "avocado-framework" version))
360 (sha256
361 (base32 "0zhz6423p0b5gqx2mvg7dmq8m9gbsay7wqjdwzirlwcg2v3rcz0m"))))
362 (build-system pyproject-build-system)
363 (arguments
364 (list
365 ;; The test suite hangs, due to a serious bug in Python/Avocado (see:
366 ;; https://github.com/avocado-framework/avocado/issues/4935).
367 #:tests? #f
368 #:phases
369 #~(modify-phases %standard-phases
370 (add-after 'unpack 'patch-paths
371 (lambda* (#:key native-inputs inputs #:allow-other-keys)
372 ;; These are runtime dependencies (inputs).
373 (substitute* "avocado/plugins/spawners/podman.py"
374 (("default='/usr/bin/podman'")
375 "default='podman'"))
376 (substitute* "avocado/utils/podman.py"
377 (("\"/usr/bin/env\", \"python3\"")
378 (format #f "~s" (search-input-file inputs "bin/python"))))
379 (substitute* "avocado/utils/memory.py"
380 (("\"sync\"")
381 (format #f "~s" (search-input-file inputs "bin/sync")))
382 (("/bin/sh")
383 (search-input-file inputs "bin/sh")))
384 ;; Batch process the tests modules with less care; if something
385 ;; is wrong, the test suite will fail. These are tests
386 ;; dependencies (native inputs).
387 (substitute* (find-files "selftests" "\\.py$")
388 (("#!/usr/bin/env")
389 (string-append "#!" (search-input-file (or native-inputs inputs)
390 "bin/env")))
391 (("/bin/(false|true|sh|sleep|sudo)" _ name)
392 (search-input-file (or native-inputs inputs)
393 (string-append "bin/" name))))))
394 (add-after 'unpack 'remove-broken-entrypoints
395 ;; The avocado-external-runner entry point fails to load, the
396 ;; 'scripts' top level package not being found (see:
397 ;; https://github.com/avocado-framework/avocado/issues/5370).
398 (lambda _
399 (substitute* "setup.py"
400 (("'avocado-external-runner = scripts.external_runner:main'.*")
401 ""))))
402 (replace 'check
403 (lambda* (#:key tests? #:allow-other-keys)
404 (when tests?
405 (setenv "HOME" "/tmp")
406 (setenv "PYTHONPATH" (getcwd))
407 (invoke "./selftests/check.py" "--skip" "static-checks")))))))
408 (native-inputs (list bash-minimal coreutils-minimal perl sudo
409 python-setuptools))
410 (inputs (list bash-minimal coreutils-minimal))
411 (home-page "https://avocado-framework.github.io/")
412 (synopsis "Tools and libraries to help with automated testing")
413 (description "Avocado is a set of tools and libraries to help with
414automated testing, i.e. a test framework. Native tests are written in Python
415and they follow the unittest pattern, but any executable can serve as a
416test. The following output formats are supported:
417@table @asis
418@item xUnit
419an XML format that contains test results in a structured form, and are used by
420other test automation projects, such as Jenkins.
421@item JSON
422a widely used data exchange format. The JSON Avocado plugin outputs job
423information, similarly to the xunit output plugin.
424@item TAP
425Provides the basic TAP (Test Anything Protocol) results. Unlike most existing
426Avocado machine readable outputs this one is streamlined (per test results).
427@end table")
428 (license license:gpl2))) ;some files are under GPLv2 only
429
430(define-public python-bandit
431 (package
432 (name "python-bandit")
433 (version "1.8.6")
434 (source
435 (origin
436 (method url-fetch)
437 (uri (pypi-uri "bandit" version))
438 (sha256
439 (base32 "0sz5lkg9anqz6ir157xr8ng9ymgj37ymbplkhl3w4qb9zhjrrznv"))))
440 (build-system pyproject-build-system)
441 (arguments
442 (list #:tests? #f)) ;tests require complex setup and networking
443 (native-inputs
444 (list python-setuptools))
445 (propagated-inputs
446 (list python-pyyaml
447 python-rich
448 python-stevedore))
449 (home-page "https://github.com/PyCQA/bandit")
450 (synopsis "Security oriented static analyser for python code")
451 (description
452 "Bandit is a tool designed to find common security issues in Python code.
453To do this Bandit processes each file, builds an AST from it, and runs
454appropriate plugins against the AST nodes. Once Bandit has finished scanning
455all the files it generates a report.")
456 (license license:asl2.0)))
457
458(define-public python-beartype
459 (package
460 (name "python-beartype")
461 (version "0.21.0")
462 (source
463 (origin
464 (method url-fetch)
465 (uri (pypi-uri "beartype" version))
466 (sha256
467 (base32 "0i1j1mkcw0fgms9qg7j30nlgcr0b0ndx2l98sb162wp8bj7hg9gr"))))
468 (build-system pyproject-build-system)
469 (native-inputs
470 (list python-hatchling python-pytest))
471 (home-page "https://github.com/beartype/beartype")
472 (synopsis "Fast runtime type checking for Python")
473 (description "Beartype aims to be a very fast runtime type checking tool
474written in pure Python.")
475 (license license:expat)))
476
477(define-public python-codacy-coverage
478 (package
479 (name "python-codacy-coverage")
480 (version "1.3.11")
481 (source
482 (origin
483 (method git-fetch)
484 (uri (git-reference
485 (url "https://github.com/codacy/python-codacy-coverage")
486 (commit version)))
487 (file-name (git-file-name name version))
488 (sha256
489 (base32 "1cxq2c6wyzynqjvc5szyhwvzdz4g3a4dv6bx80w4k4d9p40699hv"))))
490 (build-system pyproject-build-system)
491 (arguments
492 (list
493 ;; XXX: Pytest is unable to find tests, even with common tricks.
494 ;; TODO: Run tox.ini unittests after next python-team merge.
495 #:tests? #f))
496 (native-inputs (list python-setuptools python-wheel))
497 (propagated-inputs (list python-check-manifest python-requests))
498 (home-page "https://github.com/codacy/python-codacy-coverage")
499 (synopsis "Codacy coverage reporter for Python")
500 (description
501 "This package analyses Python test suites and reports how much of the
502code is covered by them. This tool is part of the Codacy suite for analysing
503code quality.")
504 (license license:expat)))
505
506(define-public python-covdefaults
507 (package
508 (name "python-covdefaults")
509 (version "2.3.0")
510 (source
511 (origin
512 ;; The PyPI tarball does not include tests.
513 (method git-fetch)
514 (uri (git-reference
515 (url "https://github.com/asottile/covdefaults")
516 (commit (string-append "v" version))))
517 (file-name (git-file-name name version))
518 (sha256
519 (base32 "1b34zkn7g66iavjxdy8hg25ab56bafgsqizf6l1anszncayal6px"))))
520 (build-system pyproject-build-system)
521 (arguments
522 ;; 88 passed, 1 deselected
523 ;; AttributeError: type object 'Plugins' has no attribute 'load_plugins'
524 (list #:test-flags #~(list "-k" "not test_coverage_init")))
525 (native-inputs
526 (list python-pytest
527 python-setuptools))
528 (propagated-inputs
529 (list python-coverage))
530 (home-page "https://github.com/asottile/covdefaults")
531 (synopsis "Coverage plugin to provide opinionated default settings")
532 (description
533 "Covdefaults is a coverage plugin to provide opinionated default
534 settings.")
535 (license license:expat)))
536
537(define-public python-coveralls
538 (package
539 (name "python-coveralls")
540 (version "4.0.1")
541 (source
542 (origin
543 (method git-fetch) ;no tests in PyPI archive
544 (uri (git-reference
545 (url "https://github.com/coveralls-clients/coveralls-python")
546 (commit version)))
547 (file-name (git-file-name name version))
548 (sha256
549 (base32 "1411h7rwxgp9ag26bmlpy7g7sdh39f56dc1mrd1n74bjsgvwzj6l"))))
550 (build-system pyproject-build-system)
551 (arguments
552 (list #:test-flags '(list
553 ;; XXX: Avoid git dependency.
554 "--ignore=tests/git_test.py"
555 ;; XXX: Unable to find coverage package.
556 "--ignore=tests/api/reporter_test.py"
557 "--ignore=tests/integration_test.py")))
558 (native-inputs
559 (list python-poetry-core
560 python-mock
561 python-pytest
562 python-responses))
563 (propagated-inputs
564 (list python-coverage
565 python-docopt
566 python-pyyaml
567 python-requests))
568 (home-page "https://github.com/coveralls-clients/coveralls-python")
569 (synopsis "Show coverage stats online via coveralls.io")
570 (description
571 "Coveralls.io is a service for publishing code coverage statistics online.
572This package provides seamless integration with coverage.py (and thus pytest,
573nosetests, etc...) in Python projects.")
574 (license license:expat)))
575
576(define-public python-cram
577 (package
578 (name "python-cram")
579 (version "0.7")
580 (home-page "https://bitheap.org/cram/")
581 (source
582 (origin
583 (method url-fetch)
584 (uri (list (string-append home-page "cram-" version ".tar.gz")
585 (pypi-uri "cram" version)))
586 (sha256
587 (base32 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
588 (build-system pyproject-build-system)
589 (arguments
590 (list
591 #:phases
592 #~(modify-phases %standard-phases
593 (add-after 'unpack 'patch-source
594 (lambda* (#:key inputs #:allow-other-keys)
595 (substitute* (find-files "cram" ".*\\.py$")
596 ;; Replace default shell path.
597 (("/bin/sh")
598 (search-input-file inputs "bin/sh")))
599 (substitute* (find-files "tests" ".*\\.t$")
600 (("md5")
601 "md5sum")
602 (("/bin/(sh|bash)")
603 (search-input-file inputs "bin/sh")))
604 (substitute* "cram/_test.py"
605 ;; This hack works around a bug triggered by substituting
606 ;; the /bin/sh paths. "tests/usage.t" compares the output of
607 ;; "cram -h", which breaks the output at 80 characters. This
608 ;; causes the line showing the default shell to break into two
609 ;; lines, but the test expects a single line...
610 (("env\\['COLUMNS'\\] = '80'")
611 "env['COLUMNS'] = '160'"))))
612 (replace 'check
613 ;; The test phase uses the built library and executable.
614 (lambda* (#:key tests? #:allow-other-keys)
615 (if tests?
616 (begin
617 (setenv "PATH" (string-append (getenv "PATH")
618 ":" #$output "/bin"))
619 (invoke "make" "quicktest"))
620 (format #t "test suite not run.~%")))))))
621 (native-inputs (list python-setuptools python-wheel))
622 (synopsis "Simple testing framework for command line applications")
623 (description
624 "Cram is a functional testing framework for command line applications.
625Cram tests look like snippets of interactive shell sessions. Cram runs each
626command and compares the command output in the test with the command’s actual
627output.")
628 (license license:gpl2+)))
629
630(define-public python-crosshair
631 (package
632 (name "python-crosshair")
633 (version "0.0.86")
634 (source
635 (origin
636 (method url-fetch)
637 (uri (pypi-uri "crosshair_tool" version))
638 (sha256
639 (base32 "19zrv6gsap0qwn4rrs1wwajg0gkq7ys8qijsilmjrhc73dylgl72"))))
640 (build-system pyproject-build-system)
641 (arguments
642 (list
643 #:test-flags
644 #~(list "--numprocesses" (number->string (parallel-job-count))
645 ;; check_examples_test.py contains failing tests that
646 ;; show what happens if a counterexample is found.
647 "--ignore=crosshair/examples/check_examples_test.py"
648 "--ignore=crosshair/lsp_server_test.py") ;requires pygls
649 #:phases
650 #~(modify-phases %standard-phases
651 (add-after 'unpack 'fix-dependencies
652 (lambda _
653 (substitute* "setup.py"
654 ;; pygls is only used by crosshair/lsp_server.py.
655 (("pygls>=1.0.0") "")
656 ;; 'sanity-check fails for z3-solver, although it is
657 ;; included in 'propagated-inputs.
658 (("z3-solver>=4.13.0.0") ""))))
659 (add-before 'check 'set-test-env
660 (lambda _
661 (setenv "PYTHONHASHSEED" "0")))))) ;tests rely on this value
662 (native-inputs
663 (list python-icontract ;optional
664 python-importlib-metadata
665 python-mypy
666 python-numpy
667 python-pytest
668 python-pytest-xdist
669 python-setuptools
670 python-wheel))
671 (propagated-inputs
672 (list python-importlib-metadata
673 python-packaging
674 ;; python-pygls
675 python-typeshed-client
676 python-typing-inspect
677 python-typing-extensions
678 z3))
679 (home-page "https://crosshair.readthedocs.io")
680 (synopsis "Analysis tool for Python using symbolic execution")
681 (description
682 "@code{crosshair} is an analysis tool for Python that works by repeatedly
683calling your functions with symbolic inputs. It uses an @acronym{SMT,
684Satisfiability modulo theories} solver explore viable execution paths and find
685counterexamples for you.")
686 (license (list license:asl2.0 license:expat license:psfl))))
687
688(define-public python-cucumber-expressions
689 (package
690 (name "python-cucumber-expressions")
691 (version "18.0.1")
692 (source
693 (origin
694 (method git-fetch)
695 (uri (git-reference
696 (url "https://github.com/cucumber/cucumber-expressions")
697 (commit (string-append "v" version))))
698 (file-name (git-file-name name version))
699 (sha256
700 (base32 "1syxa142v9sajy7n2az7d0jc6lsjg93kw659pxfs3g6ddrngpdri"))))
701 (build-system pyproject-build-system)
702 (arguments
703 (list
704 #:phases
705 #~(modify-phases %standard-phases
706 ;; Project's repository contains go, java, javascript, perl, python
707 ;; and ruby implementations.
708 (add-after 'unpack 'chdir-python
709 (lambda _
710 (chdir "python"))))))
711 (native-inputs
712 (list python-poetry-core python-pytest python-pyyaml))
713 (home-page "https://github.com/cucumber/cucumber-expressions")
714 (synopsis "A simpler alternative to Regular Expressions")
715 (description
716 "This package provides an alternative to Regular Expressions with a more
717intuitive syntax.")
718 (license license:expat)))
719
720(define-public python-cucumber-tag-expressions
721 (package
722 (name "python-cucumber-tag-expressions")
723 (version "6.1.1")
724 (source
725 (origin
726 (method git-fetch) ;no tests in PyPI archive
727 (uri (git-reference
728 (url "https://github.com/cucumber/tag-expressions")
729 (commit (string-append "v" version))))
730 (file-name (git-file-name name version))
731 (sha256
732 (base32
733 "1hanh7hzxmx0f6fp2ykabsg32snmp8y9pd7s5xix15r1gnn7lvp9"))))
734 (build-system pyproject-build-system)
735 (arguments
736 (list
737 #:phases
738 #~(modify-phases %standard-phases
739 ;; Project's repository contains go, java, javascript, perl, python
740 ;; and ruby implementations.
741 (add-after 'unpack 'chdir-python
742 (lambda _
743 (chdir "python"))))))
744 (native-inputs
745 (list python-path
746 python-pytest
747 python-pytest-html
748 python-pyyaml
749 python-setuptools
750 python-setuptools-scm))
751 (home-page "https://github.com/cucumber/tag-expressions")
752 (synopsis "Tag-expression parser for cucumber/behave")
753 (description
754 "This package provides a tag-expression parser for Cucumber and
755@command{behave}.")
756 (license license:expat)))
757
758(define-public python-deal
759 (package
760 (name "python-deal")
761 (version "4.24.5")
762 (source
763 (origin
764 (method url-fetch)
765 (uri (pypi-uri "deal" version))
766 (sha256
767 (base32 "0a2b8s8fmacv56lhrqaif0rbgrmfp0b36m5bvhly89aj5d9qvac1"))))
768 (build-system pyproject-build-system)
769 (arguments
770 (list
771 ;; tests: 668 passed, 194 skipped, 12 deselected
772 #:test-flags
773 ;; Network access is required
774 #~(list "--deselect=tests/test_imports.py::test_smoke_has"
775 #$@(map (lambda (test) (string-append "--deselect="
776 "tests/test_runtime/"
777 "test_offline.py::"
778 test))
779 (list "test_raises_exception"
780 "test_raises_specified_exception"
781 "test_allow_network"
782 "test_decorating_async_function"
783 "test_decorating_generator"))
784 ;; TypeError: MaxRetryError.__init__() missing 2 required
785 ;; positional arguments: 'pool' and 'url'
786 "--deselect=tests/test_runtime/test_pure.py::test_pure_offline"
787 ;; TypeError: MaxRetryError.__init__() missing 2 required
788 ;; positional arguments: 'pool' and 'url'
789 #$@(map (lambda (test) (string-append "--deselect="
790 "tests/test_runtime/"
791 "test_raises.py::"
792 test))
793 (list "test_raises_doesnt_override_another_contract"
794 "test_raises_doesnt_override_another_contract_async"
795 "test_raises_generator"))
796 ;; AttributeError: 'NoneType' object has no attribute
797 ;; 'TypeCheckError'
798 "--deselect=tests/test_testing.py::test_return_type_checks"
799 "--deselect=tests/test_testing.py::test_disable_type_checks")
800 #:phases
801 #~(modify-phases %standard-phases
802 (add-after 'unpack 'fix-pytest-config
803 (lambda _
804 (substitute* "pyproject.toml"
805 ((".*--cov.*") "")))))))
806 (native-inputs
807 (list python-flit-core
808 python-pytest
809 python-docstring-parser
810 python-urllib3))
811 (home-page "https://github.com/life4/deal")
812 (synopsis "Design by contract for Python")
813 (description
814 "This package provides a Python library for
815@url{https://en.wikipedia.org/wiki/Design_by_contract, design by contract}
816(DbC) and checking values, exceptions, and side-effects. In a nutshell, deal
817implements functionality to write bug-free code. By adding a few decorators
818to the code, providing free tests, static analysis, formal verification, and
819much more.")
820 (license license:expat)))
821
822(define-public python-ddt
823 (package
824 (name "python-ddt")
825 (version "1.7.2")
826 (source
827 (origin
828 (method url-fetch)
829 (uri (pypi-uri "ddt" version))
830 (sha256
831 (base32 "0jz0lglz5z5clsbralbpmd1hxs4ndb6ls7lvl7216c4nhfqdc5fj"))))
832 (build-system pyproject-build-system)
833 (native-inputs
834 (list python-aiounittest
835 python-pytest
836 python-setuptools
837 python-six
838 python-wheel))
839 (propagated-inputs
840 (list python-pyyaml))
841 (home-page "https://github.com/datadriventests/ddt")
842 (synopsis "Data-Driven Tests")
843 (description
844 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
845running it with different test data, and make it appear as multiple test
846cases.")
847 (license license:expat)))
848
849(define-public python-doc8
850 (package
851 (name "python-doc8")
852 (version "1.1.2")
853 (source
854 (origin
855 (method url-fetch)
856 (uri (pypi-uri "doc8" version))
857 (sha256
858 (base32 "162b6lff5pcd4sp6sfm5fds8kllnx7ipzbyvi3irgk718h0z698j"))))
859 (build-system pyproject-build-system)
860 (native-inputs
861 (list python-pytest
862 python-setuptools
863 python-setuptools-scm
864 python-wheel))
865 (propagated-inputs
866 (list python-docutils
867 python-pygments
868 python-restructuredtext-lint
869 python-stevedore
870 python-tomli))
871 (home-page "https://launchpad.net/doc8")
872 (synopsis "Style checker for Sphinx (or other) RST documentation")
873 (description
874 "Doc8 is an opinionated style checker for reStructured Text and plain
875text styles of documentation.")
876 (license license:asl2.0)))
877
878(define-public python-dpcontracts
879 (package
880 (name "python-dpcontracts")
881 (version "0.6.0")
882 (source
883 (origin
884 (method url-fetch)
885 (uri (pypi-uri "dpcontracts" version))
886 (sha256
887 (base32 "0ji38afb5kb52rrjhcqklqvabxxb1lbl32vr7d94iamy2qgxzybc"))))
888 (build-system pyproject-build-system)
889 (arguments
890 (list #:tests? #f)) ;no tests
891 (native-inputs (list python-setuptools))
892 (home-page "https://github.com/deadpixi/contracts")
893 (synopsis "Implementation of contracts for Python")
894 (description
895 "This package provides a simple implementation of contracts for Python.
896Contracts are a debugging and verification tool. They are declarative
897statements about what states a program must be in to be considered \"correct\"
898at runtime. They are similar to assertions, and are verified automatically at
899various well-defined points in the program. Contracts can be specified on
900functions and on classes.")
901 (license license:lgpl3+)))
902
903(define-public python-empty-files
904 (package
905 (name "python-empty-files")
906 (version "0.0.9")
907 (source
908 (origin
909 (method git-fetch)
910 (uri (git-reference
911 (url "https://github.com/approvals/EmptyFiles.Python")
912 (commit (string-append "v" version))))
913 (file-name (git-file-name name version))
914 (sha256
915 (base32 "0w3pkhymkh9wl4g8x5pssbsxr78bzb6qix95mxqqfwbx0g42iz1z"))))
916 (build-system pyproject-build-system)
917 ;; XXX: Circular dependency on python-approvaltests for tests.
918 (arguments (list #:tests? #f))
919 (propagated-inputs (list python-requests))
920 (native-inputs (list python-setuptools))
921 (home-page "https://github.com/approvals/EmptyFiles.Python")
922 (synopsis "Serve empty files of many types")
923 (description "This project will create an empty file of a type
924requested. If possible, that file will be the smallest valid file for that
925type. For example, an empty jpg will be a 1x1 pixel jpg.")
926 (license license:asl2.0)))
927
928(define-public python-eradicate
929 (package
930 (name "python-eradicate")
931 (version "3.0.0")
932 (source
933 (origin
934 (method git-fetch)
935 (uri (git-reference
936 (url "https://github.com/myint/eradicate")
937 (commit version)))
938 (file-name (git-file-name name version))
939 (sha256
940 (base32 "135xywygriid1wvqkra13iccaayh5r6a233jyfrj6kizhflksy2p"))))
941 (build-system pyproject-build-system)
942 (native-inputs (list python-pytest python-setuptools python-wheel))
943 (home-page "https://github.com/myint/eradicate")
944 (synopsis "Remove commented-out code from Python sources")
945 (description
946 "The @command{eradicate} command removes commented-out code from Python
947files. It does this by detecting block comments that contain valid Python
948syntax that are likely to be commented out code.")
949 (license license:expat)))
950
951(define-public python-expecttest
952 (package
953 (name "python-expecttest")
954 (version "0.3.0")
955 (source
956 (origin
957 (method git-fetch)
958 (uri (git-reference
959 (url "https://github.com/pytorch/expecttest")
960 (commit (string-append "v" version))))
961 (file-name (git-file-name name version))
962 (sha256
963 (base32
964 "1diz07lbbdlypbmcikj646vr5fav4prgs68nmnlqi0fr7m01l4zw"))))
965 (build-system pyproject-build-system)
966 (native-inputs
967 (list python-hypothesis
968 python-poetry-core
969 ))
970 (home-page "https://github.com/pytorch/expecttest")
971 (synopsis "Python module for expect tests")
972 (description "@code{expecttest} is a Python module for expect tests, where
973the initial expected value of a test can be automatically set by running the
974test itself.")
975 (license license:expat)))
976
977(define-public python-flake8-builtins
978 (package
979 (name "python-flake8-builtins")
980 (version "2.5.0")
981 (source
982 (origin
983 (method url-fetch)
984 (uri (pypi-uri "flake8_builtins" version))
985 (sha256
986 (base32 "19psav7pnqy3m5g4z1zah4ksbnk9bzx1jbbibs631xg44gc3vamx"))))
987 (build-system pyproject-build-system)
988 (arguments
989 (list #:test-flags #~(list "run_tests.py")))
990 (native-inputs
991 (list python-hatchling
992 python-pytest))
993 (propagated-inputs
994 (list python-flake8))
995 (home-page "https://github.com/gforcada/flake8-builtins")
996 (synopsis "Check for python builtins being used as variables or parameters")
997 (description
998 "This package implements a functionality to check for python builtins
999being used as variables or parameters.")
1000 (license license:gpl2)))
1001
1002(define-public python-flake8-class-newline
1003 (package
1004 (name "python-flake8-class-newline")
1005 (version "1.6.0")
1006 (source
1007 (origin
1008 (method git-fetch)
1009 (uri (git-reference
1010 (url "https://github.com/AlexanderVanEck/flake8-class-newline")
1011 (commit version)))
1012 (file-name (git-file-name name version))
1013 (sha256
1014 (base32 "15fw0iw2c3a3n2aarfgq7147406489xd8nk0kkj9k2x98fkwwnyh"))))
1015 (build-system pyproject-build-system)
1016 (arguments (list #:test-backend #~'unittest))
1017 (propagated-inputs (list python-flake8))
1018 (native-inputs (list python-setuptools))
1019 (home-page "https://github.com/AlexanderVanEck/flake8-class-newline")
1020 (synopsis "Flake8 lint for newline after class definitions")
1021 (description
1022 "This package provides a flake8 extension to lint for newline after class
1023definitions.")
1024 (license license:expat)))
1025
1026(define-public python-flake8-comprehensions
1027 (package
1028 (name "python-flake8-comprehensions")
1029 (version "3.16.0")
1030 (source
1031 (origin
1032 (method git-fetch) ;; no tests in the PyPI tarball
1033 (uri (git-reference
1034 (url "https://github.com/adamchainz/flake8-comprehensions")
1035 (commit version)))
1036 (file-name (git-file-name name version))
1037 (sha256
1038 (base32 "0w49k9hv77s5kq60j8j3pbvq7d79rfldqmghlqvn1xxkdkra1v7q"))))
1039 (build-system pyproject-build-system)
1040 (native-inputs
1041 (list python-pytest
1042 python-pytest-flake8-path
1043 python-pytest-randomly
1044 python-setuptools
1045 python-wheel))
1046 (propagated-inputs
1047 (list python-flake8))
1048 (home-page "https://github.com/adamchainz/flake8-comprehensions")
1049 (synopsis "List, set and dict comprehensions")
1050 (description
1051 "This package provides a flake8 plugin to help you write better
1052list/set/dict comprehensions.")
1053 (license license:expat)))
1054
1055(define-public python-flake8-deprecated
1056 (package
1057 (name "python-flake8-deprecated")
1058 (version "2.2.1")
1059 (source
1060 (origin
1061 (method url-fetch)
1062 (uri (pypi-uri "flake8_deprecated" version))
1063 (sha256
1064 (base32 "18iazzh2l42fcjmkqdwncsl1h2s6sbi26vz4m0gmd80w3l0cm5pf"))))
1065 (build-system pyproject-build-system)
1066 (arguments
1067 (list
1068 #:test-flags
1069 #~(list "run_tests.py")))
1070 (native-inputs
1071 (list python-hatchling
1072 python-pytest))
1073 (propagated-inputs
1074 (list python-flake8))
1075 (home-page "https://github.com/gforcada/flake8-deprecated")
1076 (synopsis "Warns about deprecated method calls in Python")
1077 (description
1078 "This flake8 plugin helps you keep up with method deprecations by
1079providing hints about what deprecated methods should be replaced with.")
1080 (license license:gpl2)))
1081
1082(define-public python-flake8-docstrings
1083 (package
1084 (name "python-flake8-docstrings")
1085 (version "1.7.0")
1086 (source
1087 (origin
1088 (method git-fetch)
1089 (uri (git-reference
1090 (url "https://github.com/pycqa/flake8-docstrings")
1091 (commit version)))
1092 (file-name (git-file-name name version))
1093 (sha256
1094 (base32 "0a9cx11rz9asb4xkz7dg65kx8mpa74xqh5qp3lsiy74y4idwp9qi"))))
1095 (build-system pyproject-build-system)
1096 (arguments (list #:tests? #f)) ;there are no tests
1097 (propagated-inputs (list python-flake8 python-pydocstyle))
1098 (native-inputs (list python-setuptools))
1099 (home-page "https://github.com/pycqa/flake8-docstrings")
1100 (synopsis "Extension for flake8 which uses pydocstyle to check docstrings")
1101 (description
1102 "This package provides a extension for flake8 which uses pydocstyle to
1103check docstrings.")
1104 (license license:expat)))
1105
1106(define-public python-flake8-import-order
1107 (package
1108 (name "python-flake8-import-order")
1109 (version "0.19.2")
1110 (source
1111 (origin
1112 (method url-fetch)
1113 (uri (pypi-uri "flake8_import_order" version))
1114 (sha256
1115 (base32 "1cmhpiaj9bgh64mg4y93hcbsifvqa2lriz3la0iy8cbn95akqfqk"))))
1116 (build-system pyproject-build-system)
1117 (native-inputs
1118 (list python-setuptools
1119 python-pytest
1120 python-pylama))
1121 (propagated-inputs
1122 (list python-pycodestyle))
1123 (home-page "https://github.com/PyCQA/flake8-import-order")
1124 (synopsis
1125 "Flake8 and pylama plugin that checks the ordering of import statements")
1126 (description
1127 "This package provieds a flake8 and pylama plugin that checks the ordering
1128of import statements.")
1129 (license license:lgpl3)))
1130
1131(define-public python-flexmock
1132 (package
1133 (name "python-flexmock")
1134 (version "0.12.2")
1135 (source
1136 (origin
1137 (method url-fetch)
1138 (uri (pypi-uri "flexmock" version))
1139 (sha256
1140 (base32 "18dcr7mpldf3cxsqi9rak75n4z7x3j544l4ixdspairm7cf6cp23"))))
1141 (build-system pyproject-build-system)
1142 (native-inputs
1143 (list python-poetry-core
1144 python-pytest))
1145 (home-page "https://flexmock.readthedocs.io/")
1146 (synopsis "Testing library for Python")
1147 (description
1148 "flexmock is a testing library for Python that makes it easy to create
1149mocks, stubs and fakes.")
1150 (license license:bsd-3)))
1151
1152(define-public python-gcovr
1153 (package
1154 (name "python-gcovr")
1155 (version "8.3")
1156 (source
1157 (origin
1158 (method url-fetch)
1159 (uri (pypi-uri "gcovr" version))
1160 (sha256
1161 (base32
1162 "0ych0kqbxp5giksdkh6i32vh97zrsh3m2rfs02c8rxx7qkwp38zs"))))
1163 (build-system pyproject-build-system)
1164 (native-inputs
1165 (list python-hatchling
1166 python-hatch-fancy-pypi-readme
1167 python-hatch-vcs
1168 python-pytest
1169 python-pytest-timeout))
1170 (propagated-inputs
1171 (list python-lxml
1172 python-jinja2
1173 python-colorlog
1174 python-pygments
1175 python-tomli))
1176 (home-page "https://gcovr.com/")
1177 (synopsis "Utility for generating code coverage results")
1178 (description
1179 "Gcovr provides a utility for managing the use of the GNU gcov
1180utility and generating summarized code coverage results. It is inspired
1181by the Python coverage.py package, which provides a similar utility for
1182Python.")
1183 (license license:bsd-3)))
1184
1185(define-public python-green
1186 (package
1187 (name "python-green")
1188 (version "4.0.2")
1189 (source
1190 (origin
1191 (method url-fetch)
1192 (uri (pypi-uri "green" version))
1193 (sha256
1194 (base32 "1cd62nbn5dvlpnsyplp6cb24wd230san8dpm6pnl99n2kwzpq1m4"))))
1195 (build-system pyproject-build-system)
1196 (arguments
1197 (list
1198 #:test-flags
1199 #~(list "-tvvv"
1200 "green.test.test_version"
1201 "green.test.test_cmdline")
1202 #:phases
1203 #~(modify-phases %standard-phases
1204 (replace 'check
1205 (lambda* (#:key tests? test-flags #:allow-other-keys)
1206 (when tests?
1207 (setenv "PATH" (string-append #$output "/bin:" (getenv "PATH")))
1208 (apply invoke "green" test-flags)))))))
1209 (native-inputs
1210 (list python-setuptools))
1211 (propagated-inputs
1212 (list python-colorama
1213 python-coverage
1214 python-lxml
1215 python-unidecode))
1216 (home-page "https://github.com/CleanCut/green")
1217 (synopsis "Clean, colorful, fast Python test runner")
1218 (description
1219 "@code{green} is a Python test runner that describes itself as:
1220@table @emph
1221@item Clean
1222Low redundancy in output. Result statistics for each test is vertically aligned.
1223@item Colorful
1224Terminal output makes good use of color when the terminal supports it.
1225@item Fast
1226Tests run in independent processes (one per processor by default).
1227@item Powerful
1228Multi-target and auto-discovery support.
1229@item Traditional
1230It uses the normal @code{unittest} classes and methods.
1231@item Descriptive
1232Multiple verbosity levels, from just dots to full docstring output.
1233@item Convenient
1234Bash-completion and ZSH-completion of options and test targets.
1235@item Thorough
1236Built-in integration with @url{http://nedbatchelder.com/code/coverage/, coverage}.
1237@end table")
1238 (license license:expat)))
1239
1240(define-public python-hiro
1241 (package
1242 (name "python-hiro")
1243 (version "1.1.1")
1244 (source
1245 (origin
1246 (method git-fetch)
1247 (uri (git-reference
1248 (url "https://github.com/alisaifee/hiro")
1249 (commit version)))
1250 (file-name (git-file-name name version))
1251 (sha256
1252 (base32 "0j7z54nd72qfc065jgljqx53dhfkfz0922fk8qqczg7swmqf6cqv"))))
1253 (build-system pyproject-build-system)
1254 (native-inputs
1255 (list python-pytest python-pytest-cov python-setuptools))
1256 (home-page "https://hiro.readthedocs.io")
1257 (synopsis "Time manipulation utilities for testing in Python")
1258 (description
1259 "Hiro provides context managers and utilities to either freeze,
1260accelerate or decelerate and jump between different points in time. Functions
1261exposed by the standard library’s @code{time}, @code{datetime} and @code{date}
1262modules are patched within the contexts exposed.")
1263 (license license:expat)))
1264
1265(define-public python-httmock
1266 (package
1267 (name "python-httmock")
1268 (version "1.3.0")
1269 (source
1270 (origin
1271 (method git-fetch)
1272 (uri (git-reference
1273 (url "https://github.com/patrys/httmock")
1274 (commit version)))
1275 (file-name (git-file-name name version))
1276 (sha256
1277 (base32 "1dy7pjq4gz476jcnbbpzk8w8qxr9l8wwgw9x2c7lf6fzsgnf404q"))))
1278 (build-system pyproject-build-system)
1279 (arguments
1280 (list
1281 #:test-backend #~'custom
1282 #:test-flags #~(list "tests.py")))
1283 (native-inputs (list python-setuptools))
1284 (propagated-inputs (list python-requests))
1285 (home-page "https://github.com/patrys/httmock")
1286 (synopsis "Mocking library for requests")
1287 (description "This package provides a library for replying fake data to
1288Python software under test, when they make an HTTP query.")
1289 (license license:asl2.0)))
1290
1291(define-public python-hypothesmith
1292 (package
1293 (name "python-hypothesmith")
1294 (version "0.3.3")
1295 (source
1296 (origin
1297 (method url-fetch)
1298 (uri (pypi-uri "hypothesmith" version))
1299 (sha256
1300 (base32 "05hpr3iqqsrfvkzdn7wjxp92hjxmin3pch96fn4mvs68sq14ihcn"))))
1301 (build-system pyproject-build-system)
1302 (arguments
1303 (list
1304 #:test-flags
1305 #~(list "--numprocesses" (number->string (parallel-job-count))
1306 "-k" (string-append
1307 ;; XXX: hypothesis.errors.Unsatisfiable
1308 "not test_source_code_from_libcst_node_type[MatchSingleton]"
1309 ;; XXX: Python/Black versions not as expected.
1310 " and not test_black_autoformatter_from_grammar"))))
1311 (native-inputs
1312 (list python-black ;hard requirements to run tests
1313 python-parso
1314 python-pytest
1315 python-pytest-cov
1316 python-pytest-xdist
1317 python-setuptools))
1318 (propagated-inputs
1319 (list python-hypothesis
1320 python-lark
1321 python-libcst-minimal))
1322 (home-page "https://github.com/Zac-HD/hypothesmith")
1323 (synopsis "Strategies for generating Python programs")
1324 (description
1325 "This package contains hypothesis strategies for generating Python
1326programs, something like CSmith, a random generator of C programs.")
1327 (license license:mpl2.0)))
1328
1329(define-public python-icontract
1330 (package
1331 (name "python-icontract")
1332 (version "2.7.1")
1333 (source
1334 (origin
1335 (method git-fetch)
1336 (uri (git-reference
1337 (url "https://github.com/Parquery/icontract")
1338 (commit (string-append "v" version))))
1339 (file-name (git-file-name name version))
1340 (sha256
1341 (base32 "1fix7wx899kn8vp9aa5m6q71la48gx3qqx4qd74535m61pb50r7f"))))
1342 (arguments
1343 (list
1344 #:phases
1345 #~(modify-phases %standard-phases
1346 (add-after 'unpack 'relax-requirements
1347 (lambda _
1348 (substitute* "setup.py"
1349 (("asttokens>=2,<3") "asttokens"))))
1350 (add-before 'check 'set-icontract-slow
1351 (lambda _
1352 ;; Setting ICONTRACT_SLOW, does not enable a slow test suite.
1353 ;; It only causes a single test to run, that checks the value of
1354 ;; icontract.SLOW is set correctly.
1355 (setenv "ICONTRACT_SLOW" "1"))))))
1356 (build-system pyproject-build-system)
1357 (native-inputs
1358 (list python-asyncstdlib
1359 python-astor
1360 python-deal
1361 python-dpcontracts
1362 python-mypy
1363 python-numpy
1364 python-pytest
1365 python-setuptools
1366 python-typeguard))
1367 (propagated-inputs
1368 (list python-asttokens
1369 python-typing-extensions))
1370 (home-page "https://icontract.readthedocs.io")
1371 (synopsis "Design-by-contract programming for Python")
1372 (description
1373 "@code{icontract} brings design-by-contract to Python with informative
1374violation messages and inheritance. @code{icontract} provides two function,
1375@code{require} and @code{ensure} for preconditions and postconditions
1376respectively. Additionally, it provides a class decorator, @code{invariant},
1377to establish class invariants.")
1378 (license license:expat)))
1379
1380(define-public python-inline-snapshot
1381 (package
1382 (name "python-inline-snapshot")
1383 (version "0.29.1")
1384 (source
1385 (origin
1386 (method url-fetch)
1387 (uri (pypi-uri "inline_snapshot" version))
1388 (sha256
1389 (base32 "19x5j97i96p3xr9xyjvwh0mmpcnypf8g5hf2jjm6g82ghsv3rrqp"))))
1390 (build-system pyproject-build-system)
1391 (arguments
1392 (list
1393 ;; tests: 518 passed, 88 skipped, 1 xfailed, 903 subtests passed
1394 #:test-flags
1395 #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
1396 ;; To prevent adding mypy and pyright.
1397 "--ignore=tests/test_typing.py")))
1398 (native-inputs
1399 (list python-black ;XXX: used in tests/conftest.py to self lint
1400 python-dirty-equals
1401 python-freezegun
1402 python-hatchling
1403 python-hypothesis
1404 python-pydantic-2
1405 python-pytest-bootstrap
1406 python-pytest-freezer
1407 python-pytest-mock
1408 python-pytest-subtests
1409 python-pytest-xdist))
1410 (propagated-inputs
1411 (list python-asttokens
1412 python-executing
1413 python-rich))
1414 (home-page "https://github.com/15r10nk/inline-snapshot/")
1415 (synopsis "Golden master/snapshot/approval testing library")
1416 (description
1417 "This package can be used for different things:
1418
1419@enumerate
1420@item golden master/approval/snapshot testing. The idea is that you have a
1421 function with a currently unknown result and you want to write a tests, which
1422 ensures that the result does not change during refactoring.
1423@item Compare things which are complex like lists with lot of numbers or
1424 complex data structures.
1425@item Things which might change during the development like error messages.
1426@end enumerate
1427
1428@code{inline-snapshot} automates the process of recording, storing and
1429updating the value you want to compare with. The value is converted with
1430@code{repr()} and stored in the source file as argument of the
1431@code{snapshot()} function.")
1432 (license license:expat)))
1433
1434(define-public python-junit-xml
1435 ;; XXX: There are no tags or PyPI releases, so take the latest commit
1436 ;; and use the version defined in setup.py.
1437 (let ((version "1.9")
1438 (commit "4bd08a272f059998cedf9b7779f944d49eba13a6")
1439 (revision "0"))
1440 (package
1441 (name "python-junit-xml")
1442 (version (git-version version revision commit))
1443 (home-page "https://github.com/kyrus/python-junit-xml")
1444 (source (origin
1445 (method git-fetch)
1446 (uri (git-reference (url home-page) (commit commit)))
1447 (file-name (git-file-name name version))
1448 (sha256
1449 (base32
1450 "0b8kbjhk3j10rk0vcniy695m3h43yip6y93h1bd6jjh0cp7s09c7"))))
1451 (build-system pyproject-build-system)
1452 (native-inputs (list python-pytest python-setuptools))
1453 (propagated-inputs (list python-six))
1454 (synopsis "Create JUnit XML test results")
1455 (description
1456 "This package provides a Python module for creating JUnit XML test
1457result documents that can be read by tools such as Jenkins or Bamboo.")
1458 (license license:expat))))
1459
1460(define-public python-line-profiler
1461 (package
1462 (name "python-line-profiler")
1463 (version "4.2.0")
1464 (source
1465 (origin
1466 (method url-fetch)
1467 (uri (pypi-uri "line_profiler" version))
1468 (sha256
1469 (base32 "15hs8pmv7pcilnhhp0l5pamjihmh7zlnvvpsnf046lbnz0jhzq89"))))
1470 (build-system pyproject-build-system)
1471 (arguments
1472 (list
1473 #:test-flags
1474 ;; XXX: Test can't compare the versions: AssertionError: Version
1475 ;; Mismatch: kernprof and line_profiler must be in
1476 ;; sync. kernprof.line_profiler = . kernprof.__version__ = 4.2.0.
1477 #~(list "--deselect=tests/test_cli.py::test_version_agreement")))
1478 (native-inputs
1479 (list python-cython
1480 python-pytest
1481 python-setuptools
1482 python-ubelt
1483 python-wheel
1484 python-xdoctest))
1485 (home-page "https://github.com/pyutils/line_profiler")
1486 (synopsis "Line-by-line profiler for Python")
1487 (description
1488 "This package provides @code{line_profiler} - a Python module for doing
1489line-by-line profiling of functions. @code{kernprof} is a convenient script
1490for running either @code{line_profiler} or the Python standard library's
1491cProfile or profile modules, depending on what is available. It's a
1492successor of @url{https://github.com/rkern/line_profiler}.")
1493 (license license:bsd-3)))
1494
1495(define-public python-mamba
1496 (package
1497 (name "python-mamba")
1498 (version "0.11.3")
1499 (source
1500 (origin
1501 (method git-fetch)
1502 (uri (git-reference
1503 (url "https://github.com/nestorsalceda/mamba")
1504 (commit (string-append "v" version))))
1505 (file-name (git-file-name name version))
1506 (sha256
1507 (base32 "0kyqd6q216srmylklm9ryjkrxrby3b4bs1v9a5wg4aanxmalh6j7"))))
1508 (build-system pyproject-build-system)
1509 (arguments
1510 `(#:tests? #f)) ;No test
1511 (propagated-inputs (list python-clint python-coverage))
1512 (native-inputs (list python-setuptools python-wheel))
1513 (home-page "https://nestorsalceda.com/mamba/")
1514 (synopsis "Test runner for Python")
1515 (description
1516 "Mamba is a Behaviour-Driven Development tool for Python developers.
1517 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
1518 (license license:expat)))
1519
1520(define-public python-memory-profiler
1521 (package
1522 (name "python-memory-profiler")
1523 (version "0.61")
1524 (source
1525 (origin
1526 ;; PyPi tarball lacks tests.
1527 (method git-fetch)
1528 (uri (git-reference
1529 (url "https://github.com/pythonprofilers/memory_profiler")
1530 (commit (string-append "v" version))))
1531 (file-name (git-file-name name version))
1532 (sha256
1533 (base32 "0n6g47qqmnn7abh3v25535hd8bmfvhf9bnp72m7bkd89f715m7xh"))))
1534 (build-system pyproject-build-system)
1535 (arguments
1536 (list
1537 #:phases
1538 #~(modify-phases %standard-phases
1539 ;; XXX: @profile is not loaded in some test files and there are 3
1540 ;; tests fail, disable them for now.
1541 (add-after 'unpack 'disable-failing-tests
1542 (lambda _
1543 (with-directory-excursion "test"
1544 (for-each delete-file
1545 '("test_as.py"
1546 "test_func.py"
1547 "test_gen.py"
1548 "test_loop.py"
1549 "test_loop_decorated.py"
1550 "test_mprofile.py"
1551 "test_nested.py"
1552 "test_precision_command_line.py"
1553 "test_unicode.py")))
1554 (substitute* "test/test_attributes.py"
1555 (("def test_with_profile") "def __off_test_with_profile"))
1556 (substitute* "test/test_stream_unicode.py"
1557 (("def test_unicode") "def __off_test_unicode"))
1558 (substitute* "test/test_tracemalloc.py"
1559 (("def test_memory_profiler")
1560 "def __off_test_memory_profiler")))))))
1561 (native-inputs
1562 (list python-pytest
1563 python-pytest-fixture-config
1564 python-safety
1565 python-setuptools
1566 python-wheel))
1567 (propagated-inputs (list python-psutil))
1568 (home-page "https://github.com/pythonprofilers/memory_profiler")
1569 (synopsis "Memory profiler for Python")
1570 (description
1571 "This package provides a module for monitoring the memory usage of a
1572Python program.")
1573 (license license:bsd-3)))
1574
1575(define-public python-mockito
1576 (package
1577 (name "python-mockito")
1578 (version "1.2.2")
1579 (source
1580 (origin
1581 (method git-fetch) ;no tests in pypi archive
1582 (uri (git-reference
1583 (url "https://github.com/kaste/mockito-python")
1584 (commit version)))
1585 (file-name (git-file-name name version))
1586 (sha256
1587 (base32 "0fg8jflcf4c929gd4zbcrk73d08waaqjfjmdjrgnv54mzl35pjxl"))))
1588 (build-system pyproject-build-system)
1589 (native-inputs
1590 (list python-numpy python-pytest python-setuptools python-wheel))
1591 (home-page "https://github.com/kaste/mockito-python")
1592 (synopsis "Mocking library for Python")
1593 (description "This package provides a Python implementation of the Java
1594library of the same name. It eases monkey patching, for example to stub out
1595side effects when unit testing.")
1596 (license license:expat)))
1597
1598(define-public python-mypy
1599 (package
1600 (name "python-mypy")
1601 (version "1.16.1")
1602 (source
1603 (origin
1604 (method url-fetch)
1605 (uri (pypi-uri "mypy" version))
1606 (sha256
1607 (base32
1608 "1avv8cj0qfhpw4s36bjhg994rml35fs4ndz78xg1r14l4050ml3b"))))
1609 (build-system pyproject-build-system)
1610 (arguments
1611 (list
1612 #:test-flags
1613 #~(list "--numprocesses" (number->string (parallel-job-count))
1614 ;; It tries to download hatchling and install aditional test
1615 ;; dependencies.
1616 "--ignore=mypy/test/testpep561.py")
1617 #:phases
1618 #~(modify-phases %standard-phases
1619 (add-before 'check 'set-home
1620 (lambda _
1621 ;; The directory '/homeless-shelter/.cache/pip' or its parent
1622 ;; directory is not owned or is not writable by the current
1623 ;; user.
1624 (setenv "HOME" "/tmp"))))))
1625 (native-inputs
1626 (list nss-certs-for-test
1627 python-lxml
1628 python-psutil
1629 python-pytest
1630 python-pytest-xdist
1631 python-setuptools
1632 python-types-setuptools
1633 python-wheel))
1634 (propagated-inputs
1635 (list python-mypy-extensions
1636 python-pathspec
1637 python-tomli
1638 python-typing-extensions))
1639 (home-page "https://www.mypy-lang.org/")
1640 (synopsis "Static type checker for Python")
1641 (description "Mypy is an optional static type checker for Python that aims
1642to combine the benefits of dynamic typing and static typing. Mypy combines
1643the expressive power and convenience of Python with a powerful type system and
1644compile-time type checking. Mypy type checks standard Python programs; run
1645them using any Python VM with basically no runtime overhead.")
1646 ;; Most of the code is under MIT license; Some files are under Python Software
1647 ;; Foundation License version 2: stdlib-samples/*, mypyc/lib-rt/pythonsupport.h and
1648 ;; mypyc/lib-rt/getargs.c
1649 (license (list license:expat license:psfl))))
1650
1651(define-public python-mypy-extensions
1652 (package
1653 (name "python-mypy-extensions")
1654 (version "1.1.0")
1655 (source
1656 (origin
1657 (method git-fetch) ;no tests in PyPI archive
1658 (uri (git-reference
1659 (url "https://github.com/python/mypy_extensions")
1660 (commit version)))
1661 (file-name (git-file-name name version))
1662 (sha256
1663 (base32 "12a3qs6rckxljlgw8ylkgcgpwllz96rw82lrgmhlzdgqcnqhbl0w"))))
1664 (build-system pyproject-build-system)
1665 (arguments (list #:test-backend #~'unittest
1666 #:test-flags #~(list "discover" "tests")))
1667 (native-inputs
1668 (list python-flit-core))
1669 (home-page "https://github.com/python/mypy_extensions")
1670 (synopsis "Experimental extensions for MyPy")
1671 (description
1672 "The @code{python-mypy-extensions} module defines experimental extensions
1673to the standard @code{typing} module that are supported by the MyPy
1674typechecker.")
1675 (license license:expat)))
1676
1677;;; This variant exists to break a cycle between python-pylama and python-isort.
1678(define-public python-mypy-minimal
1679 (hidden-package
1680 (package
1681 (inherit python-mypy)
1682 (name "python-mypy-minimal")
1683 (arguments
1684 `(#:tests? #f))
1685 (native-inputs
1686 (list python-setuptools
1687 python-wheel)))))
1688
1689(define-public python-nbmake
1690 (package
1691 (name "python-nbmake")
1692 (version "1.5.3")
1693 (source
1694 (origin
1695 (method git-fetch)
1696 (uri (git-reference
1697 (url "https://github.com/treebeardtech/nbmake")
1698 (commit (string-append "v" version))))
1699 (file-name (git-file-name name version))
1700 (sha256
1701 (base32 "06syl819kwqhmjwp34lri31f0pypwnxs9j03s5lbk12w42mihzdi"))))
1702 (build-system pyproject-build-system)
1703 (arguments
1704 (list
1705 #:phases
1706 '(modify-phases %standard-phases
1707 (add-before 'check 'set-HOME
1708 (lambda _ (setenv "HOME" "/tmp"))))))
1709 (propagated-inputs
1710 (list python-ipykernel python-nbclient python-nbformat python-pygments))
1711 (native-inputs
1712 (list python-poetry-core
1713 python-pytest
1714 python-pytest-xdist
1715 python-pyyaml))
1716 (home-page "https://github.com/treebeardtech/nbmake")
1717 (synopsis "Pytest plugin for testing notebooks")
1718 (description "This package provides a Pytest plugin for testing Jupyter
1719notebooks.")
1720 (license license:asl2.0)))
1721
1722(define-public python-nbval
1723 (package
1724 (name "python-nbval")
1725 (version "0.11.0")
1726 (source
1727 (origin
1728 (method url-fetch)
1729 (uri (pypi-uri "nbval" version))
1730 (sha256
1731 (base32 "154h6xpf9h6spgg3ax6k79fd40j197ipwnfjmf5rc2kvc2bmgjbp"))))
1732 (build-system pyproject-build-system)
1733 (arguments
1734 (list
1735 #:test-flags
1736 '(list
1737 ;; This test fails because of a mismatch in the output of LaTeX
1738 ;; equation environments. Seems OK to skip.
1739 "--ignore=tests/test_nbdime_reporter.py")
1740 #:phases
1741 #~(modify-phases %standard-phases
1742 (add-before 'check 'fix-test
1743 (lambda _
1744 ;; This test fails because of a mismatch in the output of LaTeX
1745 ;; equation environments. Seems OK to skip.
1746 (delete-file
1747 "tests/ipynb-test-samples/test-latex-pass-correctouput.ipynb"))))))
1748 (native-inputs
1749 (list python-pytest
1750 python-pytest-cov
1751 python-setuptools
1752 python-sympy
1753 python-wheel))
1754 (propagated-inputs
1755 (list python-coverage
1756 python-ipykernel
1757 python-jupyter-client
1758 python-nbformat
1759 python-six))
1760 (home-page "https://github.com/computationalmodelling/nbval")
1761 (synopsis "Pytest plugin to validate Jupyter notebooks")
1762 (description
1763 "This plugin adds functionality to Pytest to recognise and collect Jupyter
1764notebooks. The intended purpose of the tests is to determine whether execution
1765of the stored inputs match the stored outputs of the @file{.ipynb} file. Whilst
1766also ensuring that the notebooks are running without errors.")
1767 (license license:bsd-3)))
1768
1769(define-public python-nox
1770 (package
1771 (name "python-nox")
1772 (version "2024.10.09")
1773 (source
1774 (origin
1775 ;; No tests in the PyPI tarball.
1776 (method git-fetch)
1777 (uri (git-reference
1778 (url "https://github.com/wntrblm/nox")
1779 (commit version)))
1780 (file-name (git-file-name name version))
1781 (sha256
1782 (base32 "0gvv6hcwmmmg1sgwar42061ahx5p773d5fzx3c7sq81wh3gp7lqr"))))
1783 (build-system pyproject-build-system)
1784 (propagated-inputs
1785 (list python-argcomplete
1786 python-colorlog
1787 python-packaging
1788 python-py
1789 python-virtualenv))
1790 (native-inputs
1791 (list python-hatchling
1792 python-jinja2
1793 python-pytest))
1794 (home-page "https://nox.thea.codes/")
1795 (synopsis "Flexible test automation")
1796 (description
1797 "@code{nox} is a command-line tool that automates testing in multiple
1798Python environments, similar to @code{tox}. Unlike tox, Nox uses a standard
1799Python file for configuration.")
1800 (license license:asl2.0)))
1801
1802(define-public python-nptyping
1803 (package
1804 (name "python-nptyping")
1805 (version "2.5.0")
1806 (source (origin
1807 (method git-fetch) ;pypi only contains a binary wheel
1808 (uri (git-reference
1809 (url "https://github.com/ramonhagenaars/nptyping")
1810 (commit (string-append "v" version))))
1811 (file-name (git-file-name name version))
1812 (sha256
1813 (base32
1814 "0m6iq98qi9pl5hcc5k99bvy5w293vrlsdnimxl020i60rfnihgl7"))))
1815 (build-system pyproject-build-system)
1816 (arguments
1817 (list
1818 #:test-flags
1819 #~(list
1820 ;; This one started failing with the last update of Numpy.
1821 "--ignore=tests/test_beartype.py"
1822 ;; Multiple failures due to undefined names (typing package must be
1823 ;; too outdated, or perhaps they use a newer pandas).
1824 "--ignore=tests/test_mypy.py"
1825 "--ignore=tests/pandas_/test_mypy_dataframe.py"
1826 "--ignore=tests/pandas_/test_fork_sync.py" ;requires connectivity
1827 ;; This test requires 'python-pyright', not packaged.
1828 "--ignore=tests/test_pyright.py"
1829 ;; This one fails with "Unexpected argument of type <class 'tuple'>".
1830 "--ignore=tests/test_typeguard.py"
1831 ;; This one runs pip and fails.
1832 "--ignore=tests/test_wheel.py")
1833 #:phases
1834 #~(modify-phases %standard-phases
1835 (add-before 'build 'set-source-date-epoch
1836 (lambda _
1837 ;; Otherwise the wheel building test would fail with "ZIP does
1838 ;; not support timestamps before 1980".
1839 (setenv "SOURCE_DATE_EPOCH" "315532800"))))))
1840 (native-inputs
1841 (list python-beartype
1842 python-feedparser
1843 python-mypy
1844 python-pandas
1845 python-pytest
1846 python-setuptools
1847 python-typeguard
1848 python-wheel))
1849 (propagated-inputs
1850 (list python-numpy
1851 python-typing-extensions
1852 python-pandas-stubs))
1853 (home-page "https://github.com/ramonhagenaars/nptyping")
1854 (synopsis "Type hints for Numpy")
1855 (description "This package provides extensive dynamic type checks for
1856dtypes and shapes of arrays for NumPy, extending @code{numpy.typing}.")
1857 (license license:expat)))
1858
1859(define-public python-pandas-vet
1860 (package
1861 (name "python-pandas-vet")
1862 (version "2023.8.2")
1863 (source
1864 (origin
1865 ;; No tests in the PyPI tarball.
1866 (method git-fetch)
1867 (uri (git-reference
1868 (url "https://github.com/deppen8/pandas-vet")
1869 (commit (string-append "v" version))))
1870 (file-name (git-file-name name version))
1871 (sha256
1872 (base32 "0vkc9sa8x6vfmnd24pxp3gjlmbwx926h4y5alkdbbpb9x5h5ml3j"))))
1873 (build-system pyproject-build-system)
1874 (arguments
1875 (list
1876 #:phases
1877 #~(modify-phases %standard-phases
1878 (add-before 'build 'set-version
1879 (lambda _
1880 (substitute* "pyproject.toml"
1881 (("^source = \"regex_commit\"") "")
1882 (("^tag_sign.*") "")
1883 (("\\[tool.hatch.version\\]") "")
1884 (("dynamic = \\[\"version\"\\]")
1885 (string-append "version = \"" #$version "\"")))
1886 (with-output-to-file "src/pandas_vet/__about__.py"
1887 (let* ((version #$(package-version this-package) )
1888 (version-tuple (string-join (string-split version #\.) ", ")))
1889 (lambda ()
1890 (format #t
1891 "__version__ = version = '~a'
1892__version_tuple__ = version_tuple = (~a)~%" version version-tuple)))))))))
1893 (propagated-inputs (list python-attrs python-flake8))
1894 (native-inputs (list python-hatchling python-pytest python-pytest-cov))
1895 (home-page "https://github.com/deppen8/pandas-vet")
1896 (synopsis "Opionated @code{flake8} plugin for @code{pandas} code")
1897 (description
1898 "This package provides a @code{flake8} plugin to lint @code{pandas} code
1899in an opinionated way.")
1900 (license license:expat)))
1901
1902(define-public python-pep8-naming
1903 (package
1904 (name "python-pep8-naming")
1905 (version "0.15.1")
1906 (source
1907 (origin
1908 (method url-fetch)
1909 (uri (pypi-uri "pep8_naming" version))
1910 (sha256
1911 (base32 "0acxcg4z43kkddlvjbcbbh1jp8rx5z0cq9hz7jlyvpm2mfcs9x7n"))))
1912 (build-system pyproject-build-system)
1913 (arguments
1914 (list
1915 #:phases
1916 #~(modify-phases %standard-phases
1917 (replace 'check
1918 (lambda* (#:key tests? #:allow-other-keys)
1919 (when tests?
1920 (invoke "python" "run_tests.py")))))))
1921 (native-inputs
1922 (list python-setuptools
1923 python-wheel))
1924 (propagated-inputs
1925 (list python-flake8))
1926 (home-page "https://github.com/PyCQA/pep8-naming")
1927 (synopsis "Check PEP-8 naming conventions")
1928 (description
1929 "This package provides the @code{pep8-naming} Python module, a plugin for
1930flake8 to check PEP-8 naming conventions.")
1931 (license license:expat)))
1932
1933(define-public python-pyannotate
1934 (package
1935 (name "python-pyannotate")
1936 (version "1.2.0")
1937 (source
1938 (origin
1939 (method git-fetch)
1940 (uri (git-reference
1941 (url "https://github.com/dropbox/pyannotate")
1942 (commit (string-append "v" version))))
1943 (file-name (git-file-name name version))
1944 (sha256
1945 (base32 "0gmhl4ldan0p774dhrs9a7bmjjphlsy3hhfqq84gak15rdjs59ga"))))
1946 (build-system pyproject-build-system)
1947 (arguments (list #:test-backend #~'unittest))
1948 (native-inputs (list python-setuptools))
1949 (propagated-inputs (list python-mypy-extensions python-six))
1950 (home-page "https://github.com/dropbox/pyannotate")
1951 (synopsis "Auto-generate PEP-484 annotations")
1952 (description
1953 "This package, PyAnnotate, is used to auto-generate PEP-484 annotations.")
1954 (license license:asl2.0)))
1955
1956(define-public python-pycotap
1957 (package
1958 (name "python-pycotap")
1959 (version "1.3.1")
1960 (source
1961 (origin
1962 (method git-fetch)
1963 (uri (git-reference
1964 (url "https://github.com/remko/pycotap")
1965 (commit (string-append "v" version))))
1966 (file-name (git-file-name name version))
1967 (sha256
1968 (base32 "1xw3mrrsw7wc8yas9p2hnzj2m3mw7p1qxkj6l942gidngqphyhar"))))
1969 (build-system pyproject-build-system)
1970 (arguments
1971 ;; FIXME Unclear why tests fail.
1972 (list #:tests? #f))
1973 (native-inputs (list python-pytest python-setuptools))
1974 (home-page "https://github.com/remko/pycotap")
1975 (synopsis "Tiny Python TAP test runner")
1976 (description
1977 "This package provides a simple Python test runner for unittest that
1978outputs Test Anything Protocol (TAP) results to standard output. Contrary to
1979other TAP runners for Python, pycotap...
1980@itemize
1981@item
1982prints TAP (and only TAP) to standard output instead of to a separate file,
1983allowing you to pipe it directly to TAP pretty printers and processors;
1984@item only contains a TAP reporter, so no parsers, no frameworks, no
1985dependencies, etc;
1986@item
1987is configurable: you can choose how you want the test output and test result
1988diagnostics to end up in your TAP output (as TAP diagnostics, YAML blocks, or
1989attachments).
1990@end itemize")
1991 (license license:expat)))
1992
1993(define-public python-pyflakes
1994 (package
1995 (name "python-pyflakes")
1996 (version "3.2.0")
1997 (source
1998 (origin
1999 (method url-fetch)
2000 (uri (pypi-uri "pyflakes" version))
2001 (sha256
2002 (base32 "0gxgz0kg008pgmjk1dn8z3g00dfa9pc3f80pm6r1yqjly4zn0q8w"))))
2003 (build-system pyproject-build-system)
2004 (native-inputs
2005 (list python-pytest
2006 python-setuptools
2007 python-wheel))
2008 (home-page "https://github.com/PyCQA/pyflakes")
2009 (synopsis "Passive checker of Python programs")
2010 (description
2011 "Pyflakes statically checks Python source code for common errors.")
2012 (license license:expat)))
2013
2014(define-public python-pyinstrument
2015 (package
2016 (name "python-pyinstrument")
2017 (version "4.6.2")
2018 (source
2019 (origin
2020 (method url-fetch)
2021 (uri (pypi-uri "pyinstrument" version))
2022 (sha256
2023 (base32 "1xnp1pjhcj1xl4dq20yzzj9599cmiyxb2azblsyjnl6qgr8yw0h0"))))
2024 (build-system pyproject-build-system)
2025 (arguments
2026 (list
2027 #:test-flags
2028 #~(list "-k" (string-append
2029 ;; Disable some failing tests.
2030 "not test_script_execution_details"
2031 " and not test_path_execution_details"
2032 " and not test_module_execution_details"
2033 " and not test_program_passed_as_string_execution_details"))
2034 #:phases
2035 #~(modify-phases %standard-phases
2036 (add-before 'check 'build-extensions
2037 (lambda _
2038 (setenv "HOME" "/tmp")
2039 (invoke "python" "setup.py" "build_ext" "--inplace"))))))
2040 (native-inputs
2041 (list python-flaky
2042 python-greenlet
2043 python-pytest
2044 python-pytest-asyncio
2045 python-pytest-trio
2046 python-setuptools
2047 python-wheel))
2048 (home-page "https://github.com/joerick/pyinstrument")
2049 (synopsis "Call stack profiler for Python")
2050 (description
2051 "Pyinstrument is a Python profiler to help you optimize your code.")
2052 (license license:bsd-3)))
2053
2054(define-public python-pylama
2055 (package
2056 (name "python-pylama")
2057 (version "8.4.1")
2058 (source
2059 (origin
2060 (method git-fetch) ;no tests in PyPI archive
2061 (uri (git-reference
2062 (url "https://github.com/klen/pylama")
2063 (commit version)))
2064 (file-name (git-file-name name version))
2065 (sha256
2066 (base32 "1x9cnyfnd574mj8ckd5hbfg2wy128zg0k2cd3zc7vdbnimksvqaq"))))
2067 (build-system pyproject-build-system)
2068 (arguments
2069 (list
2070 ;; Cycles with pylint: python-pylama -> python-isort -> python-pylint ->
2071 ;; python-pylama
2072 #:tests? #f))
2073 (native-inputs
2074 (list python-setuptools
2075 python-wheel))
2076 (propagated-inputs
2077 (list python-mypy-minimal
2078 python-mccabe
2079 python-pycodestyle
2080 python-pydocstyle
2081 python-pyflakes))
2082 (home-page "https://github.com/klen/pylama")
2083 (synopsis "Code audit tool for python")
2084 (description
2085 "Pylama is a code audit tool for Python and JavaScript to check for
2086style, syntax and other code health metrics. It is essentially a convenient
2087wrapper above tools such as Pyflakes, pydocstyle, pycodestyle and McCabe,
2088among others.")
2089 (license license:lgpl3+)))
2090
2091(define-public python-pynose
2092 (package
2093 (name "python-pynose")
2094 (version "1.5.5")
2095 (source
2096 (origin
2097 (method url-fetch)
2098 (uri (pypi-uri "pynose" version))
2099 (sha256
2100 (base32 "0jbzmxnxmgf60158gpvfsp8j2cid6psfwj3j94vxv61z8wk4xnl1"))))
2101 (build-system pyproject-build-system)
2102 (native-inputs (list python-setuptools python-wheel))
2103 (home-page "https://github.com/mdmintz/pynose")
2104 (synopsis "pynose fixes nose to extend unittest and make testing easier")
2105 (description
2106 "pynose fixes nose to extend unittest and make testing easier.")
2107 (license license:lgpl2.0)))
2108
2109(define-public python-pytest-aiohttp
2110 (package
2111 (name "python-pytest-aiohttp")
2112 (version "0.3.0")
2113 (source
2114 (origin
2115 (method url-fetch)
2116 (uri (pypi-uri "pytest-aiohttp" version))
2117 (sha256
2118 (base32
2119 "0kx4mbs9bflycd8x9af0idcjhdgnzri3nw1qb0vpfyb3751qaaf9"))))
2120 (build-system python-build-system)
2121 (native-inputs
2122 (list python-pytest))
2123 (propagated-inputs
2124 (list python-aiohttp))
2125 (home-page "https://github.com/aio-libs/pytest-aiohttp/")
2126 (synopsis "Pytest plugin for aiohttp support")
2127 (description "This package provides a pytest plugin for aiohttp support.")
2128 (license license:asl2.0)))
2129
2130(define-public python-pytest-arraydiff
2131 (package
2132 (name "python-pytest-arraydiff")
2133 (version "0.6.1")
2134 (source
2135 (origin
2136 (method url-fetch)
2137 (uri (pypi-uri "pytest-arraydiff" version))
2138 (sha256
2139 (base32 "1pk7v96rkypx4ld59f6p8fh5bq371ka8g7bh4h7n4df91x2v2dr9"))))
2140 (build-system pyproject-build-system)
2141 (arguments
2142 (list
2143 #:test-flags
2144 #~(list "-k" (string-append
2145 ;; Disable tests requiring python-astropy, to break cycle.
2146 "not test_succeeds_func_fits_hdu"
2147 " and not test_fails"
2148 " and not test_generate"
2149 " and not test_default_format"))))
2150 (native-inputs
2151 (list python-pytest python-setuptools-scm
2152 python-setuptools python-wheel))
2153 (propagated-inputs
2154 (list python-numpy))
2155 (home-page "https://github.com/astropy/pytest-arraydiff")
2156 (synopsis "Pytest plugin to help with comparing array output from tests")
2157 (description
2158 "This is a py.test plugin to facilitate the generation and comparison of
2159data arrays produced during tests, in particular in cases where the arrays
2160are too large to conveniently hard-code them in the tests.")
2161 (license license:bsd-3)))
2162
2163(define-public python-pytest-asdf-plugin
2164 (package
2165 (name "python-pytest-asdf-plugin")
2166 (version "0.1.2")
2167 (source
2168 (origin
2169 (method url-fetch)
2170 (uri (pypi-uri "pytest_asdf_plugin" version))
2171 (sha256
2172 (base32 "0bcfl1s7yrnr2rlpr3hswcg9jyq6gnj0ppmpzppw9xgj796ycfb5"))))
2173 (build-system pyproject-build-system)
2174 (arguments
2175 (list #:tests? #f ;to avoid import astronomy module
2176 #:phases
2177 #~(modify-phases %standard-phases
2178 (delete 'sanity-check))))
2179 (native-inputs
2180 (list python-setuptools
2181 python-setuptools-scm))
2182 (home-page "https://github.com/asdf-format/pytest-asdf-plugin")
2183 (synopsis "Pytest plugin for testing ASDF schemas")
2184 (description
2185 "This package provides a Pytest plugin for testing ASDF schemas.")
2186 (license license:bsd-3)))
2187
2188(define-public python-pytest-astropy
2189 (package
2190 (name "python-pytest-astropy")
2191 (version "0.11.0")
2192 (source
2193 (origin
2194 (method url-fetch)
2195 (uri (pypi-uri "pytest-astropy" version))
2196 (sha256
2197 (base32 "1d9rcxnc57rjp96xag1gq725pwl11b3k5hdaz7c3w5lixncsmbjf"))))
2198 (build-system python-build-system)
2199 (arguments (list #:tests? #f)) ; there are no tests
2200 (native-inputs
2201 (list python-attrs python-pytest-mock python-setuptools-scm))
2202 (propagated-inputs
2203 (list python-hypothesis
2204 python-pytest-arraydiff
2205 python-pytest-astropy-header
2206 python-pytest-cov
2207 python-pytest-doctestplus
2208 python-pytest-filter-subpackage
2209 python-pytest-openfiles
2210 python-pytest-remotedata))
2211 (home-page "https://github.com/astropy/pytest-astropy")
2212 (synopsis
2213 "Metapackage for all the testing machinery used by the Astropy Project")
2214 (description
2215 "This is a meta-package that pulls in the dependencies that are used by
2216astropy related packages.")
2217 (license license:bsd-3)))
2218
2219(define-public python-pytest-astropy-header
2220(package
2221 (name "python-pytest-astropy-header")
2222 (version "0.2.2")
2223 (source
2224 (origin
2225 (method url-fetch)
2226 (uri (pypi-uri "pytest-astropy-header" version))
2227 (sha256
2228 (base32 "046v4arinv8b5jz05pvhnc0n1aqqndwvhlsl635ahxabr40i32bp"))))
2229 (build-system pyproject-build-system)
2230 (native-inputs
2231 (list python-numpy
2232 python-pytest
2233 python-setuptools
2234 python-setuptools-scm))
2235 (home-page "https://www.astropy.org/")
2236 (synopsis
2237 "Pytest plugin adding diagnostic data to the header of the test output")
2238 (description
2239 "This plugin package provides a way to include information about the system,
2240Python installation, and select dependencies in the header of the output when
2241running pytest. It can be used with packages that are not affiliated with the
2242Astropy project, but is optimized for use with astropy-related projects.")
2243 (license license:bsd-3)))
2244
2245(define-public python-pytest-benchmark
2246 (package
2247 (name "python-pytest-benchmark")
2248 (version "5.1.0")
2249 (source
2250 (origin
2251 (method url-fetch)
2252 (uri (pypi-uri "pytest-benchmark" version))
2253 (sha256
2254 (base32
2255 "01d1mk951ldkw589z7f0w8c22sp5341hphflghgj7s4jqb6n39ly"))))
2256 (build-system pyproject-build-system)
2257 (arguments
2258 (list #:tests? #f)) ;XXX: cycles with python-nbmake
2259 (propagated-inputs
2260 (list python-py-cpuinfo))
2261 (native-inputs
2262 (list python-pytest-bootstrap python-setuptools))
2263 (home-page "https://github.com/ionelmc/pytest-benchmark")
2264 (synopsis "Pytest fixture for benchmarking code")
2265 (description
2266 "This package provides a pytest fixture that will group the tests into
2267rounds that are calibrated to the chosen timer.")
2268 (license license:bsd-2)))
2269
2270(define-public python-pytest-black
2271 (package
2272 (name "python-pytest-black")
2273 (version "0.6.0")
2274 (source
2275 (origin
2276 (method url-fetch)
2277 (uri (pypi-uri "pytest_black" version))
2278 (sha256
2279 (base32
2280 "04dmhv8dzh356qdxz6hrwfz3nk3mlc9shicgpns5r03rydap9dzc"))))
2281 (build-system pyproject-build-system)
2282 (native-inputs
2283 (list python-setuptools
2284 python-wheel))
2285 (propagated-inputs
2286 (list python-black
2287 python-pytest
2288 python-toml))
2289 ;; Project maintenance has been changed, see
2290 ;; <https://github.com/shopkeep/pytest-black/issues/70>.
2291 (home-page "https://github.com/coherent-oss/pytest-black")
2292 (synopsis "Pytest plugin to enable format checking with black")
2293 (description
2294 "This package provides a pytest plugin to enable format checking with the
2295Python code formatter \"black\".")
2296 (license license:expat)))
2297
2298(define-public python-pytest-cases
2299 (package
2300 (name "python-pytest-cases")
2301 (version "3.9.1")
2302 (source
2303 (origin
2304 (method url-fetch)
2305 (uri (pypi-uri "pytest_cases" version))
2306 (sha256
2307 (base32 "13vzivzca36g3rbz3k3zny7jqv35vsl2z0fl32ik3j95npqq3qf4"))))
2308 (build-system pyproject-build-system)
2309 (native-inputs
2310 (list python-pytest-asyncio
2311 python-pytest-bootstrap
2312 python-pytest-harvest
2313 python-pytest-steps
2314 python-setuptools
2315 python-setuptools-scm))
2316 (propagated-inputs
2317 (list python-decopatch
2318 python-makefun
2319 python-packaging))
2320 (home-page "https://github.com/smarie/python-pytest-cases")
2321 (synopsis "Separate test code from test cases in pytest.")
2322 (description
2323 "This package provides a Pytest plugin which leverages
2324@code{@@pytest.mark.parametrize} decorator separating test cases from test
2325functions.")
2326 (license license:bsd-3)))
2327
2328(define-public python-pytest-celery
2329 (package
2330 (name "python-pytest-celery")
2331 (version "0.0.0")
2332 (source
2333 (origin
2334 (method url-fetch)
2335 (uri (pypi-uri "pytest-celery" version))
2336 (sha256
2337 (base32 "01pli108qqiiyrn8qsqqabcpazrzj27r7cji9wgglsk76by61l6g"))))
2338 (build-system python-build-system)
2339 (arguments
2340 `(#:tests? #f ; no tests and circular dependency on python-celery
2341 #:phases
2342 (modify-phases %standard-phases
2343 (delete 'sanity-check)))) ; checks for celery
2344 (home-page "https://github.com/graingert/pytest-celery")
2345 (synopsis "Shim pytest plugin to enable @code{celery.contrib.pytest}")
2346 (description
2347 "This package provides a shim Pytest plugin to enable a Celery marker.")
2348 (license license:bsd-3)))
2349
2350(define-public python-pytest-check
2351 (package
2352 (name "python-pytest-check")
2353 (version "2.5.3")
2354 (source
2355 (origin
2356 (method url-fetch)
2357 (uri (pypi-uri "pytest_check" version))
2358 (sha256
2359 (base32 "1jkhmii6zrgzq0427sy9igm7a6nfvx7p4ms91h6d75f3fzgxfmr3"))))
2360 (build-system pyproject-build-system)
2361 (native-inputs (list python-hatchling python-pytest))
2362 (home-page "https://github.com/okken/pytest-check")
2363 (synopsis "Pytest plugin to allow multiple failures")
2364 (description "This package provides a pytest plugin that allows multiple
2365failures per test.")
2366 (license license:expat)))
2367
2368(define-public python-pytest-checkdocs
2369 (package
2370 (name "python-pytest-checkdocs")
2371 (version "2.10.0") ;PyPI contains only the latest version
2372 (source
2373 (origin
2374 (method git-fetch)
2375 (uri (git-reference
2376 (url "https://github.com/jaraco/pytest-checkdocs")
2377 (commit (string-append "v" version))))
2378 (file-name (git-file-name name version))
2379 (sha256
2380 (base32 "1amw07skzfwy88dqvcsh308lcds7avyyja0qzdqrk4739cm1g0vh"))))
2381 (build-system pyproject-build-system)
2382 (arguments
2383 (list
2384 #:tests? #f ;tests require network access
2385 #:phases
2386 #~(modify-phases %standard-phases
2387 (add-before 'build 'set-version
2388 (lambda _
2389 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))))))
2390 (native-inputs
2391 (list python-pytest-bootstrap
2392 python-setuptools-scm
2393 python-wheel))
2394 (propagated-inputs
2395 (list python-docutils
2396 python-pypa-build))
2397 (home-page "https://github.com/jaraco/pytest-checkdocs")
2398 (synopsis "Check the README when running tests")
2399 (description
2400 "This package provides a pytest plugin that checks the long description
2401of the project to ensure it renders properly.")
2402 (license license:expat)))
2403
2404(define-public python-pytest-click
2405 (package
2406 (name "python-pytest-click")
2407 (version "1.0.2")
2408 (source
2409 (origin
2410 (method git-fetch)
2411 (uri (git-reference
2412 (url "https://github.com/Stranger6667/pytest-click")
2413 (commit (string-append "v" version))))
2414 (file-name (git-file-name name version))
2415 (sha256
2416 (base32 "197nvlqlyfrqpy5lrkmfh1ywpr6j9zipxl9d7syg2a2n7jz3a8rj"))))
2417 (build-system pyproject-build-system)
2418 (native-inputs (list python-setuptools python-wheel))
2419 (propagated-inputs (list python-click python-pytest))
2420 (home-page "https://github.com/Stranger6667/pytest-click")
2421 (synopsis "Pytest plugin for Click")
2422 (description
2423 "This package provides a plugin to test Python click interfaces with
2424pytest.")
2425 (license license:expat)))
2426
2427(define-public python-pytest-console-scripts
2428 (package
2429 (name "python-pytest-console-scripts")
2430 (version "1.4.1")
2431 (source
2432 (origin
2433 (method url-fetch)
2434 (uri (pypi-uri "pytest-console-scripts" version))
2435 (sha256
2436 (base32 "15d8yi6g9wd7g6gkzhp0m3fpnbvnglfkhi4yxc1a5by09kc6x0js"))))
2437 (build-system pyproject-build-system)
2438 (arguments
2439 (list
2440 #:test-flags
2441 #~(list "-k" (string-join
2442 ;; FileNotFoundError: [Errno 2] No such file or directory:
2443 ;; 'script.py'
2444 (list "not test_elsewhere_in_the_path"
2445 "test_shell"
2446 "test_run_path")
2447 " and not "))))
2448 (native-inputs
2449 (list python-pytest-bootstrap
2450 python-setuptools))
2451 (home-page "https://github.com/kvas-it/pytest-console-scripts")
2452 (synopsis "Pytest plugin for testing console scripts")
2453 (description
2454 "This package provides a pytest plugin for testing console scripts.")
2455 (license license:expat)))
2456
2457(define-public python-pytest-cookies
2458 (package
2459 (name "python-pytest-cookies")
2460 (version "0.7.0")
2461 (source
2462 (origin
2463 (method git-fetch) ; no tests in PyPI
2464 (uri (git-reference
2465 (url "https://github.com/hackebrot/pytest-cookies")
2466 (commit version)))
2467 (file-name (git-file-name name version))
2468 (sha256
2469 (base32 "1x7ny6mx1siy9law1cv1i63nvv9ds2g1dlagm40l8qymxry43mjn"))))
2470 (build-system pyproject-build-system)
2471 (native-inputs (list python-pytest python-setuptools python-wheel))
2472 (propagated-inputs (list python-cookiecutter))
2473 (home-page "https://github.com/hackebrot/pytest-cookies")
2474 (synopsis "Pytest plugin for Cookiecutter templates")
2475 (description
2476 "This Pytest plugin adds a @code{cookies} fixture, which is a
2477wrapper for the Cookiecutter API. This fixture helps you verify that
2478your template is working as expected and takes care of cleaning up after
2479running the tests.")
2480 (license license:expat)))
2481
2482(define-public python-pytest-csv
2483 (package
2484 (name "python-pytest-csv")
2485 (version "3.0.0")
2486 (source
2487 (origin
2488 (method git-fetch) ;no tests in PyPI archive
2489 (uri (git-reference
2490 (url "https://github.com/nicoulaj/pytest-csv")
2491 (commit version)))
2492 (file-name (git-file-name name version))
2493 (sha256
2494 (base32
2495 "17518f2fn5l98lyk9p8r7215c1whi61imzrh6ahrmcksr8w0zz04"))))
2496 (build-system pyproject-build-system)
2497 (native-inputs
2498 (list python-pytest-flake8
2499 python-pytest-xdist
2500 python-setuptools
2501 python-tabulate
2502 python-wheel))
2503 (propagated-inputs
2504 (list python-pytest python-six))
2505 (home-page "https://github.com/nicoulaj/pytest-csv")
2506 (synopsis "CSV reporter for Pytest")
2507 (description "This package provides a plugin for Pytest that enables a
2508CSV output mode for Pytest. It can be enabled via the @option{--csv} option
2509it adds to the Pytest command line interface (CLI).")
2510 (license license:gpl3+)))
2511
2512(define-public python-pytest-cython
2513 (package
2514 (name "python-pytest-cython")
2515 (version "0.3.1")
2516 (source
2517 (origin
2518 (method url-fetch)
2519 (uri (pypi-uri "pytest-cython" version))
2520 (sha256
2521 (base32 "0ma496dgmmrpgqd3zk6vin29dgajcplh63yqd8jh2a3ai954fr22"))))
2522 (build-system pyproject-build-system)
2523 (arguments
2524 (list
2525 ;; E ModuleNotFoundError: No module named 'setuptools.sandbox'
2526 #:tests? #f)) ;XXX: tests are broken
2527 (native-inputs (list python-cython python-setuptools python-wheel))
2528 (propagated-inputs (list python-pytest))
2529 (home-page "https://github.com/lgpage/pytest-cython")
2530 (synopsis "Cython extension modules testing plugin")
2531 (description
2532 "This package provides a plugin for testing Cython extension modules.")
2533 (license license:expat)))
2534
2535(define-public python-pytest-datafiles
2536 (package
2537 (name "python-pytest-datafiles")
2538 (version "3.0.0")
2539 (source
2540 (origin
2541 (method git-fetch) ; no tests in the PyPI tarball
2542 (uri (git-reference
2543 (url "https://github.com/omarkohl/pytest-datafiles")
2544 (commit version)))
2545 (file-name (git-file-name name version))
2546 (sha256
2547 (base32 "1wbgfsn4pcdm0bw61pwaaq707mlfnixlff3x8m5mpsf6jhrzql30"))))
2548 (build-system pyproject-build-system)
2549 (native-inputs
2550 (list python-pytest python-setuptools python-wheel))
2551 (home-page "https://github.com/omarkohl/pytest-datafiles")
2552 (synopsis "Pytest plugin to create a tmpdir")
2553 (description
2554 "A pytest plugin to create a tmpdir containing a preconfigured set of
2555files and/or directories.")
2556 (license license:expat)))
2557
2558(define-public python-pytest-doctest-custom
2559 (package
2560 (name "python-pytest-doctest-custom")
2561 (version "1.0.0")
2562 (source
2563 (origin
2564 (method git-fetch)
2565 (uri (git-reference
2566 (url "https://github.com/danilobellini/pytest-doctest-custom")
2567 (commit (string-append "v" version))))
2568 (file-name (git-file-name name version))
2569 (sha256
2570 (base32 "0hpdfazzvpgyhfr5la9n8k7a1j3z2nvqp76wiyzr73ha5wij33zl"))))
2571 (build-system pyproject-build-system)
2572 (arguments
2573 (list
2574 #:phases
2575 #~(modify-phases %standard-phases
2576 (replace 'check
2577 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
2578 (when tests?
2579 (add-installed-pythonpath inputs outputs)
2580 (invoke "python" "test_pytest_doctest_custom.py")))))))
2581 (native-inputs (list python-pytest python-setuptools python-wheel))
2582 (home-page "https://github.com/danilobellini/pytest-doctest-custom")
2583 (synopsis
2584 "Pytest plugin to customize string representations of doctest results")
2585 (description
2586 "This package provides a Pytest plugin for customizing string
2587representations of doctest results. It can change the display hook used by
2588doctest to render the object representations.")
2589 (license license:expat)))
2590
2591(define-public python-pytest-doctestplus
2592 (package
2593 (name "python-pytest-doctestplus")
2594 (version "1.2.1")
2595 (source
2596 (origin
2597 (method url-fetch)
2598 (uri (pypi-uri "pytest-doctestplus" version))
2599 (sha256
2600 (base32 "0ybn613rp0wqzm97hncwnpn8wx7bz91rajgnclplv8yfr2iahwi4"))))
2601 (build-system pyproject-build-system)
2602 (arguments
2603 (list
2604 #:test-flags
2605 #~(list "-k" (string-join
2606 ;; Tests requiring network access.
2607 (list "not test_remote_data_url"
2608 "test_remote_data_float_cmp"
2609 "test_remote_data_ignore_whitespace"
2610 "test_remote_data_ellipsis"
2611 "test_remote_data_requires"
2612 "test_remote_data_ignore_warnings")
2613 " and not "))
2614 #:phases
2615 #~(modify-phases %standard-phases
2616 (add-after 'unpack 'patch-git-path
2617 (lambda _
2618 (substitute* "pytest_doctestplus/plugin.py"
2619 (("\"git\"")
2620 (format #f "'~a/bin/git'"
2621 #$(this-package-native-input "git-minimal")))))))))
2622 (native-inputs
2623 (list git-minimal/pinned
2624 python-numpy
2625 python-pytest
2626 python-setuptools-scm
2627 python-wheel))
2628 (propagated-inputs
2629 (list python-setuptools)) ;for pkg_resources
2630 (home-page "https://github.com/astropy/pytest-doctestplus")
2631 (synopsis "Pytest plugin with advanced doctest features")
2632 (description
2633 "This package contains a plugin for the Pytest framework that provides
2634advanced doctest support and enables the testing of reStructuredText files.")
2635 (license license:bsd-3)))
2636
2637(define-public python-pytest-env
2638 (package
2639 (name "python-pytest-env")
2640 (version "1.1.5")
2641 (source
2642 (origin
2643 (method url-fetch)
2644 (uri (pypi-uri "pytest_env" version))
2645 (sha256
2646 (base32 "1ky11hgb00wdz3mrsfk6zp17r56j99allimcfd83hhqfm909h84i"))))
2647 (build-system pyproject-build-system)
2648 (native-inputs
2649 (list python-hatch-vcs
2650 python-hatchling
2651 python-pytest))
2652 (home-page "https://github.com/MobileDynasty/pytest-env")
2653 (synopsis "Pytest plugin that allows you to add environment variables")
2654 (description
2655 "This is a @code{py.test} plugin that enables you to set environment
2656variables in the @file{pytest.ini} file.")
2657 (license license:expat)))
2658
2659(define-public python-pytest-filter-subpackage
2660 (package
2661 (name "python-pytest-filter-subpackage")
2662 (version "0.2.0")
2663 (source
2664 (origin
2665 (method url-fetch)
2666 (uri (pypi-uri "pytest-filter-subpackage" version))
2667 (sha256
2668 (base32 "0mmgg2n8qk6s2kprycjl70lxcpm43dkapplmkf32i0ai6qdqyiiz"))))
2669 (build-system pyproject-build-system)
2670 (native-inputs
2671 (list python-pytest
2672 python-pytest-cov
2673 python-pytest-doctestplus
2674 python-setuptools-scm
2675 python-setuptools
2676 python-wheel))
2677 (home-page "https://github.com/astropy/pytest-filter-subpackage")
2678 (synopsis "Pytest plugin for filtering based on sub-packages")
2679 (description
2680 "This package contains a simple plugin for the pytest framework that
2681provides a shortcut to testing all code and documentation for a given
2682sub-package.")
2683 (license license:bsd-3)))
2684
2685(define-public python-pytest-fixture-config
2686 ;; TODO: Master branch has removed all Python 2 support such Six, consider
2687 ;; to update and drop python-six from closure in the next update cyle.
2688 (package
2689 (name "python-pytest-fixture-config")
2690 (version "1.8.0")
2691 (source
2692 (origin
2693 (method url-fetch)
2694 (uri (pypi-uri "pytest-fixture-config" version))
2695 (sha256
2696 (base32
2697 "03hvviv0a4y0r8pdnj5s3hdbr2d3k9cx0ipjafxbsl88w9gqjff7"))))
2698 (build-system pyproject-build-system)
2699 (native-inputs
2700 (list python-pytest-bootstrap
2701 python-setuptools
2702 python-six))
2703 (home-page "https://github.com/manahl/pytest-plugins")
2704 (synopsis "Fixture configuration utils for py.test")
2705 (description
2706 "This package provides fixture configuration utilities for the py.test
2707testing framework.")
2708 (license license:expat)))
2709
2710(define-public python-pytest-flake8
2711 (package
2712 (name "python-pytest-flake8")
2713 (version "1.3.0")
2714 (source
2715 (origin
2716 (method url-fetch)
2717 (uri (pypi-uri "pytest_flake8" version))
2718 (sha256
2719 (base32
2720 "1rhz7mxcg7x9dbabfcjai3zxikfgw7az07m4ddf92bg35ib3byw8"))))
2721 (build-system pyproject-build-system)
2722 (native-inputs
2723 (list python-pytest
2724 python-setuptools
2725 python-wheel))
2726 (propagated-inputs
2727 (list python-flake8))
2728 (home-page "https://github.com/tholo/pytest-flake8")
2729 (synopsis "Pytest plugin to check FLAKE8 requirements")
2730 (description
2731 "This package provides a pytest plugin for efficiently checking PEP8
2732compliance.")
2733 (license license:bsd-3)))
2734
2735(define-public python-pytest-flake8-path
2736 (package
2737 (name "python-pytest-flake8-path")
2738 (version "1.6.0")
2739 (source
2740 (origin
2741 (method git-fetch) ;no tests in PyPI archive
2742 (uri (git-reference
2743 (url "https://github.com/adamchainz/pytest-flake8-path")
2744 (commit version)))
2745 (file-name (git-file-name name version))
2746 (sha256
2747 (base32 "1k1lv34jmfirdwa2dpiim8803b6krqy3m7k2knc39fgmzbd6yc8z"))))
2748 (build-system pyproject-build-system)
2749 (native-inputs
2750 (list python-setuptools
2751 python-wheel))
2752 (propagated-inputs
2753 (list python-flake8
2754 python-pytest))
2755 (home-page "https://github.com/adamchainz/pytest-flake8-path")
2756 (synopsis "Pytest fixture for testing flake8 plugins")
2757 (description
2758 "This package provides a pytest fixture for testing flake8 plugins.")
2759 (license license:expat)))
2760
2761(define-public python-pytest-flakefinder
2762 (package
2763 (name "python-pytest-flakefinder")
2764 (version "1.1.0")
2765 (source
2766 (origin
2767 (method url-fetch)
2768 (uri (pypi-uri "pytest-flakefinder" version))
2769 (sha256
2770 (base32 "03iy80xlkpgzjs2kxa9rrj8dbnp9awyhpcl3hy8fgf5x40cjlhg2"))))
2771 (build-system pyproject-build-system)
2772 (native-inputs (list python-wheel python-setuptools))
2773 (propagated-inputs (list python-pytest))
2774 (home-page "https://github.com/dropbox/pytest-flakefinder")
2775 (synopsis "Pytest plugin for finding flaky tests")
2776 (description "This package provides a Pytest plugin to run tests multiple
2777times and detect flakyness.")
2778 (license license:asl2.0)))
2779
2780(define-public python-pytest-flask
2781 (package
2782 (name "python-pytest-flask")
2783 (version "1.3.0")
2784 (source
2785 (origin
2786 (method url-fetch)
2787 (uri (pypi-uri "pytest-flask" version))
2788 (sha256
2789 (base32 "0pm93xli1pvq9w053grndi84hxq087mr2xhagvac98qvnabirgjq"))))
2790 (build-system pyproject-build-system)
2791 (native-inputs
2792 (list python-pytest
2793 python-setuptools
2794 python-setuptools-scm
2795 python-wheel))
2796 (propagated-inputs
2797 (list python-flask))
2798 (home-page "https://github.com/pytest-dev/pytest-flask")
2799 (synopsis "Pytest fixtures to test Flask applications")
2800 (description
2801 "This pytest plugin provides fixtures to simplify Flask app testing.")
2802 (license license:expat)))
2803
2804(define-public python-pytest-freezer
2805 (package
2806 (name "python-pytest-freezer")
2807 (version "0.4.9")
2808 (source
2809 (origin
2810 (method url-fetch)
2811 (uri (pypi-uri "pytest_freezer" version))
2812 (sha256
2813 (base32 "0an8y6ri3bhij4137gphdw2yg6rq7if4nb1qjj7zjsy4kjy1dgr1"))))
2814 (build-system pyproject-build-system)
2815 (native-inputs
2816 (list python-flit-core))
2817 (propagated-inputs
2818 (list python-freezegun
2819 python-pytest))
2820 (home-page "https://github.com/pytest-dev/pytest-freezer/")
2821 (synopsis "Pytest plugin providing a fixture interface for spulec/freezegun")
2822 (description
2823 "Pytest plugin providing a fixture interface for
2824@url{https://github.com/spulec/freezegun, freezegun}.")
2825 (license license:expat)))
2826
2827(define-public python-pytest-harvest
2828 (package
2829 (name "python-pytest-harvest")
2830 (version "1.10.5")
2831 (source
2832 (origin
2833 (method url-fetch)
2834 (uri (pypi-uri "pytest-harvest" version))
2835 (sha256
2836 (base32 "066lqx46hqlvllq6ppmyi47fjc1dww7jwa4wfkkx2hrf3z7s9kr7"))))
2837 (build-system pyproject-build-system)
2838 (arguments
2839 (list #:tests? #f)) ;XXX: cycle with python-pytest-harvest
2840 (native-inputs
2841 (list python-pytest-bootstrap
2842 python-setuptools
2843 python-setuptools-scm))
2844 (propagated-inputs
2845 (list python-decopatch
2846 python-makefun
2847 python-packaging))
2848 (home-page "https://github.com/smarie/python-pytest-harvest")
2849 (synopsis "Pytest plugin to store data during runs")
2850 (description
2851 "This package implements a functionality to store data created during your
2852pytest tests execution, and retrieve it at the end of the session, e.g. for
2853applicative benchmarking purposes.")
2854 (license license:bsd-3)))
2855
2856(define-public python-pytest-helpers-namespace
2857 (package
2858 (name "python-pytest-helpers-namespace")
2859 (version "2021.3.24")
2860 (source
2861 (origin
2862 (method git-fetch)
2863 (uri (git-reference
2864 (url "https://github.com/saltstack/pytest-helpers-namespace")
2865 (commit (string-append "v" version))))
2866 (file-name (git-file-name name version))
2867 (sha256
2868 (base32 "0ikwiwp9ycgg7px78nxdkqvg7j97krb6vzqlb8fq8fvbwrj4q4v2"))))
2869 (build-system pyproject-build-system)
2870 (arguments
2871 (list
2872 #:phases
2873 #~(modify-phases %standard-phases
2874 (add-after 'unpack 'set-version
2875 (lambda _
2876 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))))))
2877 (native-inputs (list python-pytest python-setuptools python-setuptools-scm
2878 python-setuptools-declarative-requirements
2879 python-wheel))
2880 (home-page "https://github.com/saltstack/pytest-helpers-namespace")
2881 (synopsis "Pytest Helpers Namespace Plugin")
2882 (description
2883 "Pytest Helpers Namespace Plugin provides a helpers pytest namespace
2884which can be used to register helper functions without requiring someone to
2885import them in their actual tests to use them.")
2886 (license license:asl2.0)))
2887
2888(define-public python-pytest-home
2889 (package
2890 (name "python-pytest-home")
2891 (version "0.6.0")
2892 (source
2893 (origin
2894 (method git-fetch)
2895 (uri (git-reference
2896 (url "https://github.com/jaraco/pytest-home")
2897 (commit (string-append "v" version))))
2898 (file-name (git-file-name name version))
2899 (sha256
2900 (base32 "151xx48dahbh7yx2a9cr9f2iy2i6f7s3zsm4zn5apvgl9qmjhkk7"))))
2901 (build-system pyproject-build-system)
2902 (arguments
2903 (list
2904 #:phases
2905 #~(modify-phases %standard-phases
2906 (add-after 'unpack 'set-version
2907 (lambda _
2908 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))))))
2909 (propagated-inputs (list python-pytest))
2910 (native-inputs
2911 (list git-minimal
2912 python-pytest
2913 python-setuptools
2914 python-setuptools-scm))
2915 (home-page "https://github.com/jaraco/pytest-home")
2916 (synopsis "Home directory fixtures")
2917 (description
2918 "This package provides home directory fixtures for pytest.")
2919 (license license:expat)))
2920
2921(define-public python-pytest-html
2922 (package
2923 (name "python-pytest-html")
2924 (version "4.1.1")
2925 (source
2926 (origin
2927 (method url-fetch)
2928 (uri (pypi-uri "pytest_html" version))
2929 (sha256
2930 (base32 "01vgd2bbk3n9wcqzx9dv72qgkx684l8cp92n9c3ll3w0wn51x83h"))))
2931 (build-system pyproject-build-system)
2932 (arguments
2933 (list
2934 #:test-flags
2935 ;; It requires running browser for selenium.
2936 #~(list "--ignore=testing/test_integration.py"
2937 "--ignore=testing/test_e2e.py")))
2938 (native-inputs
2939 (list python-hatchling
2940 python-hatch-vcs
2941 python-assertpy
2942 python-beautifulsoup4
2943 python-pytest))
2944 (propagated-inputs
2945 (list python-jinja2
2946 python-pytest-metadata))
2947 (home-page "https://github.com/pytest-dev/pytest-html")
2948 (synopsis "Pytest plugin for generating HTML reports")
2949 (description
2950 "This package provides a pytest plugin for generating HTML reports.")
2951 (license license:mpl2.0)))
2952
2953(define-public python-pytest-httpx
2954 (package
2955 (name "python-pytest-httpx")
2956 (version "0.35.0")
2957 (source
2958 (origin
2959 ;; pypi package doesn't include the tests
2960 (method git-fetch)
2961 (uri (git-reference
2962 (url "https://github.com/Colin-b/pytest_httpx")
2963 (commit (string-append "v" version))))
2964 (file-name (git-file-name name version))
2965 (sha256
2966 (base32 "1w8qwhcaq1l63kfj4ncsi3355ln37ws6066mxr0b9646g68wp69v"))))
2967 (build-system pyproject-build-system)
2968 (arguments
2969 (list
2970 ;; XXX: 261 failed, 170 errors
2971 #:tests? #f))
2972 (native-inputs
2973 (list python-pytest
2974 python-pytest-asyncio
2975 python-setuptools
2976 python-wheel))
2977 (propagated-inputs (list python-httpx))
2978 (home-page "https://colin-b.github.io/pytest_httpx/")
2979 (synopsis "Pytest plugin to mock httpx")
2980 (description "This package provides a pytest fixture to mock httpx
2981requests to be replied to with user provided responses.")
2982 (license license:expat)))
2983
2984(define-public python-pytest-isort
2985 (package
2986 (name "python-pytest-isort")
2987 (version "3.1.0")
2988 (source
2989 (origin
2990 (method git-fetch)
2991 (uri (git-reference
2992 (url "https://github.com/stephrdev/pytest-isort")
2993 (commit version)))
2994 (file-name (git-file-name name version))
2995 (sha256
2996 (base32 "07hj2z2jsshk0m60j0w10q3yzis69714k7qbw2f0cprc5li9b06n"))))
2997 (build-system pyproject-build-system)
2998 (propagated-inputs (list python-isort python-pytest))
2999 (native-inputs (list python-poetry-core))
3000 (home-page "https://github.com/stephrdev/pytest-isort")
3001 (synopsis "Pytest plugin to check import ordering using isort")
3002 (description
3003 "This package provides a pytest plugin to check import ordering using
3004isort.")
3005 (license license:bsd-3)))
3006
3007(define-public python-pytest-metadata
3008 (package
3009 (name "python-pytest-metadata")
3010 (version "3.1.1")
3011 (source
3012 (origin
3013 (method url-fetch)
3014 (uri (pypi-uri "pytest_metadata" version))
3015 (sha256
3016 (base32 "1j0ph028mj81314vxb027d5b98xii3zl2vd9i8b3zh7val1rp8nj"))))
3017 (build-system pyproject-build-system)
3018 (native-inputs
3019 (list python-hatchling
3020 python-hatch-vcs
3021 python-pytest
3022 python-setuptools-scm))
3023 (home-page "https://github.com/pytest-dev/pytest-metadata")
3024 (synopsis "Access test session metadata with Pytest")
3025 (description
3026 "@code{pytest-metadata} is a @command{pytest} plugin that provides
3027access to test session metadata.")
3028 (license license:mpl2.0)))
3029
3030(define-public python-pytest-mockito
3031 (package
3032 (name "python-pytest-mockito")
3033 (version "0.0.4")
3034 (source
3035 (origin
3036 (method git-fetch) ;no tests in pypi archive
3037 (uri (git-reference
3038 (url "https://github.com/kaste/pytest-mockito")
3039 (commit version)))
3040 (file-name (git-file-name name version))
3041 (sha256
3042 (base32
3043 "0hnpazaw3mglx1c405z2hkavgan99rqb3wgrcqk8x5kmhpay53xx"))))
3044 (build-system python-build-system)
3045 (arguments
3046 '(#:phases
3047 (modify-phases %standard-phases
3048 (replace 'check
3049 (lambda* (#:key tests? #:allow-other-keys)
3050 (when tests?
3051 (invoke "python" "-m" "pytest" "-vv")))))))
3052 (propagated-inputs
3053 (list python-mockito python-pytest))
3054 (home-page "https://github.com/kaste/pytest-mockito")
3055 (synopsis "Mockito base fixtures for Pytest")
3056 (description "The @code{pytest-mockito} plugin provides base Mockito
3057fixtures for Pytest. It covers the main entry points of the Mockito mocking
3058framework and makes it easy to undo any monkey patching. The fixtures are:
3059@itemize
3060@item when
3061@item when2
3062@item expect
3063@item patch
3064@item unstub
3065@item spy2
3066@end itemize")
3067 (license license:expat)))
3068
3069(define-public python-pytest-mpi
3070 (package
3071 (name "python-pytest-mpi")
3072 (version "0.6")
3073 (source
3074 (origin
3075 (method url-fetch)
3076 (uri (pypi-uri "pytest-mpi" version))
3077 (sha256
3078 (base32 "1a954cai5lr327np5f38mg8gw91p4akx8m2z416wvwzq24swvcq9"))))
3079 (build-system pyproject-build-system)
3080 (arguments
3081 ;; See <https://github.com/aragilar/pytest-mpi/issues/4>.
3082 (list #:test-flags
3083 #~(list "-p" "pytester"
3084 #$@(if (target-aarch64?)
3085 ;; Some tests fail on non x86_64 more likely the
3086 ;; project does not support any other ones, see
3087 ;; <ci/azure-pipelines-steps.yml>.
3088 ;; ValueError: Pytest terminal summary report not found
3089 '("-k" (string-join
3090 (list "not test_mpi_file_name"
3091 "test_mpi_only_mpi"
3092 "test_mpi_skip_under_mpi"
3093 "test_mpi_tmp_path"
3094 "test_mpi_tmpdir"
3095 "test_mpi_with_mpi"
3096 "test_mpi_xfail_under_mpi")
3097 " and not "))
3098 '()))))
3099 (native-inputs
3100 (list openmpi
3101 python-pytest
3102 python-setuptools
3103 python-sybil
3104 python-wheel))
3105 (home-page "https://pytest-mpi.readthedocs.io")
3106 (synopsis "Pytest plugin to collect information from tests")
3107 (description
3108 "@code{pytest_mpi} is a plugin for pytest providing some useful tools
3109when running tests under MPI, and testing MPI-related code.")
3110 (license license:bsd-3)))
3111
3112(define-public python-pytest-mpl
3113 (package
3114 (name "python-pytest-mpl")
3115 (version "0.17.0")
3116 (source
3117 (origin
3118 (method url-fetch)
3119 (uri (pypi-uri "pytest-mpl" version))
3120 (sha256
3121 (base32 "1inaaafzxgbxldz4xqvx68gpj8p5i30qlsgva8sb7d34wvbhbvzv"))))
3122 (build-system pyproject-build-system)
3123 (arguments
3124 (list
3125 #:test-flags #~(list "-m" "mpl_image_compare")))
3126 (native-inputs
3127 (list python-pytest
3128 python-setuptools
3129 python-setuptools-scm
3130 python-wheel))
3131 (propagated-inputs
3132 (list python-jinja2
3133 python-matplotlib
3134 python-packaging
3135 python-pillow))
3136 (home-page "https://github.com/matplotlib/pytest-mpl")
3137 (synopsis "Pytest plugin to help with testing figures output from Matplotlib")
3138 (description
3139 "This is a plugin to facilitate image comparison for Matplotlib figures
3140in Pytest.")
3141 (license license:bsd-3)))
3142
3143(define-public python-pytest-openfiles
3144 (package
3145 (name "python-pytest-openfiles")
3146 (version "0.6.0")
3147 (source
3148 (origin
3149 (method url-fetch)
3150 (uri (pypi-uri "pytest_openfiles" version))
3151 (sha256
3152 (base32 "14x9f1l9a5ghf527i5qfcfa003mkrky1dhx2hfwq5nma9v1n0lgz"))))
3153 (build-system pyproject-build-system)
3154 (native-inputs
3155 (list python-pytest
3156 python-setuptools
3157 python-setuptools-scm
3158 python-wheel))
3159 (propagated-inputs
3160 (list python-psutil))
3161 (home-page "https://github.com/astropy/pytest-openfiles")
3162 (synopsis "Pytest plugin for detecting inadvertent open file handles")
3163 (description
3164 "This package provides a plugin for the pytest framework that allows
3165developers to detect whether any file handles or other file-like objects
3166were inadvertently left open at the end of a unit test.")
3167 (license license:bsd-3)))
3168
3169(define-public python-pytest-order
3170 (package
3171 (name "python-pytest-order")
3172 (version "1.3.0")
3173 (source
3174 (origin
3175 (method url-fetch)
3176 (uri (pypi-uri "pytest_order" version))
3177 (sha256
3178 (base32 "1pixy83l6hcg16gjc04vp4misk2w989alkd9msnw1s9y7pn8yq2i"))))
3179 (build-system pyproject-build-system)
3180 (arguments
3181 (list
3182 ;; XXX: 4 failed, 18 errors
3183 #:tests? #f))
3184 (native-inputs
3185 (list python-pytest python-pytest-xdist
3186 python-setuptools python-wheel))
3187 (home-page "https://github.com/pytest-dev/pytest-order")
3188 (synopsis "Pytest plugin to run your tests in a specific order")
3189 (description
3190 "This plugin defines Pytest markers to ensure that some tests, or groups
3191of tests run in a specific order.")
3192 (license license:expat)))
3193
3194(define-public python-pytest-parawtf
3195 (package
3196 (name "python-pytest-parawtf")
3197 (version "1.0.2")
3198 (source
3199 (origin
3200 (method url-fetch)
3201 (uri (pypi-uri "pytest-parawtf" version))
3202 (sha256
3203 (base32 "08s86hy58lvrd90cnayzydvac4slaflj0ph9yknakcc42anrm023"))))
3204 (build-system pyproject-build-system)
3205 (arguments
3206 (list
3207 #:test-flags
3208 ;; https://github.com/flub/pytest-parawtf/issues/1
3209 #~(list "-k" "not test_mark")))
3210 (native-inputs (list python-pytest python-setuptools python-wheel))
3211 (propagated-inputs (list python-pytest))
3212 (home-page "https://github.com/flub/pytest-parawtf/")
3213 (synopsis "Finally spell paramete?ri[sz]e correctly")
3214 (description
3215 "Pytest uses one of four different spellings of parametrize. This plugin
3216allows you to use all four.")
3217 (license license:expat)))
3218
3219(define-public python-pytest-pycodestyle
3220 (package
3221 (name "python-pytest-pycodestyle")
3222 (version "2.4.1")
3223 (source
3224 (origin
3225 (method url-fetch)
3226 (uri (pypi-uri "pytest_pycodestyle" version))
3227 (sha256
3228 (base32
3229 "1jdm5arsh150fvph0960kycb1cwj728mksfwxb65bbbl4zaypkr7"))))
3230 (build-system pyproject-build-system)
3231 (arguments
3232 (list
3233 ;; XXX: pytest failed to import 'py.io', while python can.
3234 #:tests? #f))
3235 (propagated-inputs
3236 (list python-py python-pycodestyle python-pytest))
3237 (native-inputs
3238 (list python-pytest-isort python-setuptools python-wheel))
3239 (home-page "https://github.com/henry0312/pytest-pycodestyle")
3240 (synopsis "Pytest plugin to run pycodestyle")
3241 (description "This package provides a plugin to run @code{pycodestyle}
3242for the @code{pytest} framework.")
3243 (license license:expat)))
3244
3245(define-public python-pytest-pydocstyle
3246 (package
3247 (name "python-pytest-pydocstyle")
3248 (version "2.4.0")
3249 (source
3250 (origin
3251 (method git-fetch)
3252 (uri (git-reference
3253 (url "https://github.com/henry0312/pytest-pydocstyle")
3254 (commit (string-append "v" version))))
3255 (file-name (git-file-name name version))
3256 (sha256
3257 (base32 "08jaz92pzq6lqg64jbl9f6j0gdb622wl0qb2llfcy82grx2vv09q"))))
3258 (build-system pyproject-build-system)
3259 (arguments
3260 (list
3261 ;; XXX: pytest failed to import 'py.io', while python can.
3262 #:tests? #f))
3263 (native-inputs
3264 (list python-pytest
3265 python-pytest-isort
3266 python-pytest-pycodestyle
3267 python-setuptools
3268 python-wheel))
3269 (propagated-inputs (list python-pydocstyle python-pytest)) ;apparently required
3270 (home-page "https://github.com/henry0312/pytest-pydocstyle")
3271 (synopsis "Pytest plugin to run @command{pydocstyle}")
3272 (description
3273 "This package provides a Pytest plugin to run @command{pydocstyle}.")
3274 (license license:expat)))
3275
3276(define-public python-pytest-pylint
3277 (package
3278 (name "python-pytest-pylint")
3279 (version "0.21.0")
3280 (source
3281 (origin
3282 (method url-fetch)
3283 (uri (pypi-uri "pytest-pylint" version))
3284 (sha256
3285 (base32 "0gjm9qy1rsngvli042szqc45y0q5zk1crq28ja01iyjw3n74nxl8"))))
3286 (build-system pyproject-build-system)
3287 (native-inputs
3288 (list python-pytest
3289 python-setuptools
3290 python-wheel))
3291 (propagated-inputs
3292 (list python-pylint))
3293 (home-page "https://github.com/carsongee/pytest-pylint")
3294 (synopsis "Pytest plugin to check source code with Pylint")
3295 (description
3296 "This plugin allows running Pylint with Pytest and have configurable rule
3297types (i.e. Convention, Warn, and Error) fail the build.")
3298 (license license:expat)))
3299
3300(define-public python-pytest-qt
3301 (package
3302 (name "python-pytest-qt")
3303 (version "4.5.0")
3304 (source
3305 (origin
3306 (method url-fetch)
3307 (uri (pypi-uri "pytest_qt" version))
3308 (sha256
3309 (base32 "17ridbk4gsr1aclgs1ai55r6k2ngrg0wn9b40g96bw48qh0hwqji"))))
3310 (build-system pyproject-build-system)
3311 (arguments
3312 (list
3313 #:phases
3314 #~(modify-phases %standard-phases
3315 (add-before 'check 'set-qpa
3316 (lambda _ (setenv "QT_QPA_PLATFORM" "offscreen"))))))
3317 (native-inputs
3318 (list python-pyqt-6
3319 python-pytest-bootstrap
3320 python-setuptools
3321 python-setuptools-scm))
3322 (propagated-inputs
3323 (list python-pluggy
3324 python-typing-extensions))
3325 (home-page "https://github.com/pytest-dev/pytest-qt")
3326 (synopsis "Pytest support for PyQt and PySide applications")
3327 (description
3328 "@code{pytest-qt} is a Pytest plugin that allows programmers to write
3329tests for PyQt5 and PySide2 applications.
3330
3331The main usage is to use the @code{qtbot} fixture, responsible for handling
3332@code{qApp} creation as needed and provides methods to simulate user
3333interaction, like key presses and mouse clicks.")
3334 (license license:expat)))
3335
3336(define-public python-pytest-recording
3337 (package
3338 (name "python-pytest-recording")
3339 (version "0.13.4")
3340 (source
3341 (origin
3342 (method url-fetch)
3343 (uri (pypi-uri "pytest_recording" version))
3344 (sha256
3345 (base32 "133nj8vha63gv226f0gvqn16gnazbn2rqh8amv2fx4jrm2r693an"))))
3346 (build-system pyproject-build-system)
3347 (arguments
3348 (list #:tests? #f)) ;XXX: more than 50% tets failed
3349 (native-inputs
3350 (list python-pytest-bootstrap
3351 python-hatchling))
3352 (propagated-inputs
3353 (list python-vcrpy))
3354 (home-page "https://github.com/kiwicom/pytest-recording")
3355 (synopsis "Pytest support for recording and replaying HTTP traffic")
3356 (description
3357 "This package provides a Pytest plugin powered by
3358@url{https://vcrpy.readthedocs.io/en/latest/, VCR.py} to record and replay
3359HTTP traffic.")
3360 (license license:expat)))
3361
3362(define-public python-pytest-remotedata
3363 (package
3364 (name "python-pytest-remotedata")
3365 (version "0.4.1")
3366 (source
3367 (origin
3368 (method url-fetch)
3369 (uri (pypi-uri "pytest-remotedata" version))
3370 (sha256
3371 (base32 "0ndvnj9zghfj17haphrygiri9iy38wb8lwq1xdkfvlfd73v8ph05"))))
3372 (build-system pyproject-build-system)
3373 (arguments
3374 (list
3375 #:test-flags
3376 #~(list "--numprocesses" (number->string (parallel-job-count))
3377 "-k" (string-join
3378 ;; Network access is required.
3379 (list "not test_internet_access"
3380 ;; Failed with assertion error.
3381 "test_default_behavior"
3382 "test_strict_with_decorator")
3383 " and not "))))
3384 (native-inputs
3385 (list python-pytest
3386 python-pytest-xdist
3387 python-setuptools
3388 python-setuptools-scm
3389 python-wheel))
3390 (propagated-inputs
3391 (list python-packaging))
3392 (home-page "https://github.com/astropy/pytest-remotedata")
3393 (synopsis "Pytest plugin for controlling remote data access")
3394 (description
3395 "This package provides a plugin for the Pytest framework that allows
3396developers to control unit tests that require access to data from the
3397internet.")
3398 (license license:bsd-3)))
3399
3400(define-public python-pytest-repeat
3401 (package
3402 (name "python-pytest-repeat")
3403 (version "0.9.1")
3404 (source
3405 (origin
3406 (method url-fetch)
3407 (uri (pypi-uri "pytest-repeat" version))
3408 (sha256
3409 (base32 "0nxdbghjz6v4xidl5ky9wlx6z4has3vygj5r7va5ccdb8nbjilsw"))))
3410 (build-system python-build-system)
3411 (arguments
3412 `(#:phases
3413 (modify-phases %standard-phases
3414 (replace 'check
3415 (lambda* (#:key tests? #:allow-other-keys)
3416 (when tests?
3417 (invoke "pytest")))))))
3418 (propagated-inputs
3419 (list python-pytest))
3420 (native-inputs
3421 (list python-setuptools-scm))
3422 (home-page "https://github.com/pytest-dev/pytest-repeat")
3423 (synopsis "Pytest plugin for repeating tests")
3424 (description "@code{pytest-repeat} is a plugin for Pytest that makes it
3425enables repeating a single test, or multiple tests, a specific number of
3426times.")
3427 (license license:mpl2.0)))
3428
3429(define-public python-pytest-rerunfailures
3430 (package
3431 (name "python-pytest-rerunfailures")
3432 (version "15.1")
3433 (source
3434 (origin
3435 (method url-fetch)
3436 (uri (pypi-uri "pytest_rerunfailures" version))
3437 (sha256
3438 (base32 "106fiqn3d86xcl2cwmc76svi2mkfgphqna37bf617f6pmdl06166"))))
3439 (build-system pyproject-build-system)
3440 (native-inputs
3441 (list python-pytest-bootstrap
3442 python-setuptools))
3443 (propagated-inputs
3444 (list python-packaging))
3445 (home-page "https://github.com/pytest-dev/pytest-rerunfailures")
3446 (synopsis "Pytest plugin to re-run flaky tests")
3447 (description "This package provides a pytest plugin to re-run tests to
3448eliminate flaky failures.")
3449 (license license:mpl2.0)))
3450
3451(define-public python-pytest-retry
3452 (package
3453 (name "python-pytest-retry")
3454 (version "1.7.0")
3455 (source
3456 (origin
3457 (method url-fetch)
3458 (uri (pypi-uri "pytest_retry" version))
3459 (sha256
3460 (base32 "03zqgl2y16pcf0w0sn7z9n1gaqmkspl9xfhigks9v50yy0wj7mgq"))))
3461 (build-system pyproject-build-system)
3462 (native-inputs
3463 (list python-pytest-bootstrap
3464 python-setuptools))
3465 (home-page "https://github.com/str0zzapreti/pytest-retry")
3466 (synopsis "Pytest plugin to retry flaky tests in CI environments")
3467 (description
3468 "This package provides a plugin for Pytest which adds the ability to retry
3469flaky tests, thereby improving the consistency of the test suite results.")
3470 (license license:expat)))
3471
3472;; This is only used by python-sanic
3473(define-public python-pytest-sanic
3474 (package
3475 (name "python-pytest-sanic")
3476 (version "1.9.1")
3477 (source (origin
3478 (method url-fetch)
3479 (uri (pypi-uri "pytest-sanic" version))
3480 (sha256
3481 (base32
3482 "0shq1bqnydj0l3ipb73j1qh5kqcjvzkps30zk8grq3dwmh3wmnkr"))))
3483 (build-system pyproject-build-system)
3484 (arguments
3485 ;; Tests depend on python-sanic.
3486 (list
3487 #:tests? #f
3488 #:phases
3489 #~(modify-phases %standard-phases
3490 (add-after 'unpack 'use-poetry-core
3491 (lambda _
3492 ;; Patch to use the core poetry API.
3493 (substitute* "pyproject.toml"
3494 (("poetry.masonry.api") "poetry.core.masonry.api")))))))
3495 (native-inputs
3496 (list python-poetry-core))
3497 (propagated-inputs
3498 (list python-httpx python-async-generator python-pytest
3499 python-websockets))
3500 (home-page "https://github.com/yunstanford/pytest-sanic")
3501 (synopsis "Pytest plugin for Sanic")
3502 (description "This package provides a pytest plugin for Sanic. It helps
3503you to test your code asynchronously.")
3504 (license license:expat)))
3505
3506(define-public python-pytest-services
3507 (package
3508 (name "python-pytest-services")
3509 (version "1.3.1")
3510 (source
3511 (origin
3512 (method git-fetch)
3513 (uri (git-reference
3514 (url "https://github.com/pytest-dev/pytest-services")
3515 (commit version)))
3516 (file-name (git-file-name name version))
3517 (sha256
3518 (base32 "123s2vd3h5knfs6lz7b83z0wl2miqsbya3w71cm8xk6hgyb10nmv"))))
3519 (build-system pyproject-build-system)
3520 (arguments
3521 ;; XXX: Tests require running memcached, mysql and X servers.
3522 (list #:tests? #f))
3523 (propagated-inputs (list python-psutil python-requests))
3524 (native-inputs (list python-pytest python-setuptools python-wheel))
3525 (home-page "https://github.com/pytest-dev/pytest-services")
3526 (synopsis "Services plugin for pytest testing framework")
3527 (description
3528 "This plugin provides a set of fixtures and utility functions to start
3529service processes for your tests with pytest.")
3530 (license license:expat)))
3531
3532(define-public python-pytest-shard
3533 (let ((commit "64610a08dac6b0511b6d51cf895d0e1040d162ad")
3534 (revision "0"))
3535 (package
3536 (name "python-pytest-shard")
3537 (version (git-version "0.1.2" revision commit))
3538 (source
3539 (origin
3540 (method git-fetch)
3541 (uri (git-reference
3542 (url "https://github.com/AdamGleave/pytest-shard")
3543 (commit commit)))
3544 (file-name (git-file-name name version))
3545 (sha256
3546 (base32 "1h31m68igz670bzl307hazjrfbr8pk14mxflllar18ydmlrnl677"))))
3547 (build-system pyproject-build-system)
3548 (native-inputs (list python-setuptools python-wheel))
3549 (propagated-inputs (list python-pytest))
3550 (home-page "https://github.com/AdamGleave/pytest-shard")
3551 (synopsis "Pytest plugin for sharding tests")
3552 (description "This package provides a Pytest extension for sharding
3553tests at the granularity of individual test cases, which can be run in
3554parallel and on multiple machines.")
3555 (license license:expat))))
3556
3557(define-public python-pytest-shutil
3558 (package
3559 (name "python-pytest-shutil")
3560 (version "1.8.0")
3561 (source
3562 (origin
3563 (method url-fetch)
3564 (uri (pypi-uri "pytest-shutil" version))
3565 (sha256
3566 (base32
3567 "18283zgs3z61paymzf0pp5x3di3hg3m91pvb3v7bmz3fggphdl5a"))))
3568 (build-system pyproject-build-system)
3569 (arguments
3570 (list
3571 #:phases
3572 #~(modify-phases %standard-phases
3573 (add-after 'unpack 'patch-tests
3574 (lambda _
3575 (mkdir "/tmp/bin")
3576 (substitute* "tests/integration/test_cmdline_integration.py"
3577 (("dirname = '/bin'")
3578 "dirname = '/tmp/bin'")
3579 (("bindir = os.path.realpath\\('/bin'\\)")
3580 "bindir = os.path.realpath('/tmp/bin')")))))))
3581 (native-inputs
3582 (list python-pytest
3583 python-setuptools
3584 python-setuptools-git
3585 python-wheel))
3586 (propagated-inputs
3587 (list python-execnet
3588 python-mock
3589 python-path
3590 python-six
3591 python-termcolor))
3592 (home-page "https://github.com/manahl/pytest-plugins")
3593 (synopsis "Assorted shell and environment tools for py.test")
3594 (description
3595 "This package provides assorted shell and environment tools for the
3596py.test testing framework.")
3597 (license license:expat)))
3598
3599(define-public python-pytest-snapshot
3600 (package
3601 (name "python-pytest-snapshot")
3602 (version "0.9.0")
3603 (source
3604 (origin
3605 (method url-fetch)
3606 (uri (pypi-uri "pytest-snapshot" version))
3607 (sha256
3608 (base32 "1wxp9pv5yqpj3fk450ld1mjhhdxyvssgi6gqxyghz1iyphx3q0f7"))))
3609 (build-system pyproject-build-system)
3610 (arguments
3611 (list
3612 ;; Skip failing test. Related upstream issue:
3613 ;; <https://github.com/joseph-roitman/pytest-snapshot/issues/71>.
3614 #:test-flags #~(list "-k" "not test_assert_match_failure_bytes")))
3615 (native-inputs
3616 (list python-setuptools
3617 python-setuptools-scm
3618 python-wheel))
3619 (propagated-inputs
3620 (list python-pytest))
3621 (home-page "https://github.com/joseph-roitman/pytest-snapshot")
3622 (synopsis "Pytest plugin for snapshot testing")
3623 (description
3624 "This package provides a plugin for snapshot testing with pytest. It can
3625be used to test that the value of an expression does not change
3626unexpectedly.")
3627 (license license:expat)))
3628
3629(define-public python-pytest-socket
3630 (package
3631 (name "python-pytest-socket")
3632 (version "0.7.0")
3633 (source
3634 (origin
3635 ;; There are no tests in the PyPI tarball.
3636 (method git-fetch)
3637 (uri (git-reference
3638 (url "https://github.com/miketheman/pytest-socket")
3639 (commit version)))
3640 (file-name (git-file-name name version))
3641 (sha256
3642 (base32 "1m6s07gvljq82hiajzy1v123kpkciziiqdjqfnas169rmzg0bmnp"))))
3643 (build-system pyproject-build-system)
3644 (arguments
3645 (list
3646 #:test-flags
3647 #~(list "-k" (string-append
3648 ;; Disable test requiring network access.
3649 "not test_disable_socket_urllib"
3650 " and not test_parametrize_with_socket_enabled_and_allow_hosts"
3651 " and not test_global_disable_and_allow_host"
3652 " and not test_asynctest"
3653 " and not test_httpx_fails"
3654 " and not test_disabled_urllib_fails"
3655 " and not test_urllib_succeeds_by_default"
3656 " and not test_enabled_urllib_succeeds"
3657 " and not test_single_cli_arg_connect_disabled_hostname_resolved"))
3658 #:phases
3659 #~(modify-phases %standard-phases
3660 ;; See <https://github.com/miketheman/pytest-socket/issues/308>
3661 (add-after 'unpack 'fix-tests
3662 (lambda _
3663 (substitute* (list "tests/test_async.py"
3664 "tests/test_socket.py"
3665 "tests/test_precedence.py")
3666 (("from tests.common import assert_socket_blocked")
3667 "from common import assert_socket_blocked")))))))
3668 (native-inputs (list python-httpx
3669 python-poetry-core
3670 python-pypa-build
3671 python-pytest
3672 python-pytest-httpbin
3673 python-pytest-randomly
3674 python-starlette))
3675 (home-page "https://pypi.org/project/pytest-socket/")
3676 (synopsis "Pytest plugin to disable socket calls during tests")
3677 (description
3678 "This package provides Pytest extension which disables all network calls flowing
3679through Python's socket interface")
3680 (license license:expat)))
3681
3682(define-public python-pytest-split
3683 (package
3684 (name "python-pytest-split")
3685 (version "0.10.0")
3686 (source
3687 (origin
3688 (method git-fetch)
3689 (uri (git-reference
3690 (url "https://github.com/jerry-git/pytest-split")
3691 (commit version)))
3692 (file-name (git-file-name name version))
3693 (sha256 (base32 "1w42zkw22h0ydfhbjdjp93frbrzi1rlkr17ifb9kavcbv7kfqxfl"))))
3694 (build-system pyproject-build-system)
3695 (arguments
3696 (list
3697 #:phases
3698 #~(modify-phases %standard-phases
3699 (add-after 'unpack 'fix-pytest-config
3700 (lambda _
3701 (substitute* "pyproject.toml"
3702 (("--cov.*") "")
3703 (("--no-cov-on-fail.*") "")))))))
3704 (native-inputs
3705 (list python-poetry-core
3706 python-pytest-bootstrap))
3707 (home-page "https://jerry-git.github.io/pytest-split/")
3708 (synopsis "Pytest plugin to split the test suite to equally sized sub sutes")
3709 (description
3710 "This package provides Pytest plugin which splits the test suite to equally
3711sized sub suites based on
3712test execution time.")
3713 (license license:expat)))
3714
3715(define-public python-pytest-steps
3716 (package
3717 (name "python-pytest-steps")
3718 (version "1.8.0")
3719 (source
3720 (origin
3721 (method url-fetch)
3722 (uri (pypi-uri "pytest-steps" version))
3723 (sha256
3724 (base32 "05r2ch7191saj7sw6d47bfa5vnyyj157dl8hvlcc78xx6jyxy46j"))))
3725 (build-system pyproject-build-system)
3726 (arguments
3727 (list #:tests? #f)) ;XXX: cycles with python-pytest-harvest
3728 (native-inputs
3729 (list python-pytest-bootstrap
3730 python-setuptools
3731 python-setuptools-scm))
3732 (propagated-inputs
3733 (list python-makefun
3734 python-wrapt))
3735 (home-page "https://github.com/smarie/python-pytest-steps")
3736 (synopsis "Pytest plugin to create step-wise / incremental tests")
3737 (description
3738 "This package implements a functionality to share a state / intermediate
3739 results across test steps.")
3740 (license license:bsd-3)))
3741
3742(define-public python-pytest-subprocess
3743 (package
3744 (name "python-pytest-subprocess")
3745 (version "1.5.3")
3746 (source
3747 (origin
3748 (method git-fetch) ;no tests in PyPI archive
3749 (uri (git-reference
3750 (url "https://github.com/aklajnert/pytest-subprocess")
3751 (commit version)))
3752 (file-name (git-file-name name version))
3753 (sha256
3754 (base32
3755 "1yb5y6dqzf6k5a07yzdpw8w50bm7zbsdvv06ii7c7vyg9wx5iw6y"))))
3756 (build-system pyproject-build-system)
3757 (arguments
3758 (list
3759 ;; 134 passed, 4 skipped, 4 deselected
3760 #:test-flags
3761 ;; XXX: Skip tests fixed on master in
3762 ;; be30d9a94ba45afb600717e3fcd95b8b2ff2c60e commit, not critical,
3763 ;; re-chech in the next refresh cycle.
3764 #~(list "--deselect=tests/test_examples.py::test_documentation[README.rst]"
3765 "--deselect=tests/test_examples.py::test_documentation[docs/index.rst]"
3766 "--deselect=tests/test_subprocess.py::test_text[False]"
3767 "--deselect=tests/test_subprocess.py::test_universal_newlines[False]")))
3768 (native-inputs
3769 (list python-anyio
3770 python-docutils
3771 python-pygments
3772 python-pytest
3773 python-pytest-asyncio
3774 python-pytest-rerunfailures
3775 python-setuptools))
3776 (home-page "https://github.com/aklajnert/pytest-subprocess")
3777 (synopsis "Fake subprocess for Pytest")
3778 (description
3779 "This package provides a plugin to fake subprocess for Pytest.")
3780 (license license:expat)))
3781
3782(define-public python-pytest-subtests
3783 (package
3784 (name "python-pytest-subtests")
3785 (version "0.14.2")
3786 (source
3787 (origin
3788 (method url-fetch)
3789 (uri (pypi-uri "pytest_subtests" version))
3790 (sha256
3791 (base32 "1ph0z3a0lywzfw7illl3khydqffi8im2203dlxqfwa6mbxkahm3i"))))
3792 (build-system pyproject-build-system)
3793 (native-inputs
3794 (list python-pytest-bootstrap
3795 python-setuptools
3796 python-setuptools-scm
3797 python-wheel))
3798 (propagated-inputs
3799 (list python-attrs))
3800 (home-page "https://github.com/pytest-dev/pytest-subtests")
3801 (synopsis "Unittest subTest() support and subtests fixture")
3802 (description "This Pytest plugin provides unittest @code{subTest()}
3803support and @code{subtests} fixture.")
3804 (license license:expat)))
3805
3806(define-public python-pytest-testmon
3807 (package
3808 (name "python-pytest-testmon")
3809 (version "2.1.1")
3810 (source
3811 (origin
3812 (method git-fetch)
3813 (uri (git-reference
3814 (url "https://github.com/tarpas/pytest-testmon")
3815 (commit (string-append "v" version))))
3816 (file-name (git-file-name name version))
3817 (sha256
3818 (base32 "01qhbkb3n8c5c4id94w6b06q9wb7b6a33mqwyrkdfzk5pzv1gcyd"))))
3819 (build-system pyproject-build-system)
3820 (arguments (list #:tests? #false)) ;there are none
3821 (native-inputs
3822 (list python-coverage
3823 python-pytest
3824 python-setuptools
3825 python-wheel))
3826 (home-page "https://github.com/tarpas/pytest-testmon")
3827 (synopsis "Selects tests affected by changed files and methods")
3828 (description
3829 "This plug-in auto-selects and reruns tests impacted by recent changes.")
3830 (license license:expat)))
3831
3832(define-public python-pytest-textual-snapshot
3833 (package
3834 (name "python-pytest-textual-snapshot")
3835 (version "1.1.0")
3836 (source
3837 (origin
3838 (method url-fetch)
3839 (uri (pypi-uri "pytest_textual_snapshot" version))
3840 (sha256
3841 (base32 "1ss4hm2xgxx07qn9s7p9fykzvmzxsl4g0rg198xjm1862fq8mm4n"))))
3842 (build-system pyproject-build-system)
3843 (arguments
3844 (list
3845 #:tests? #f ; no tests in PyPI or Git
3846 #:phases
3847 #~(modify-phases %standard-phases
3848 (add-after 'unpack 'patch-path
3849 (lambda _
3850 ;; Taken from NixOS package definition.
3851 (substitute* "pytest_textual_snapshot.py"
3852 (("this_file_path.parent")
3853 (string-append "Path('" #$output
3854 "/share/pytest-textual-snapshot/')")))))
3855 (add-after 'install 'post-install
3856 (lambda _
3857 (install-file "./resources/snapshot_report_template.jinja2"
3858 (string-append #$output
3859 "/share/pytest-textual-snapshot/resources/")))))))
3860 (native-inputs
3861 (list python-pytest
3862 python-poetry-core))
3863 (propagated-inputs
3864 (list python-jinja2
3865 python-rich
3866 python-syrupy
3867 python-textual))
3868 (home-page "https://github.com/Textualize/pytest-textual-snapshot")
3869 (synopsis "Pytest plugin for snapshot testing Textual applications")
3870 (description
3871 "This package implements a functionality to save an SVG screenshot of a
3872running Textual app to disk. The next time the test runs, it takes another
3873screenshot and compares it to the saved one. If the new screenshot differs
3874from the old one, the test fails. This is a convenient way to quickly and
3875automatically detect visual regressions in your applications.")
3876 (license license:expat)))
3877
3878(define-public python-pytest-tornado
3879 (package
3880 (name "python-pytest-tornado")
3881 (version "0.8.1")
3882 (source
3883 (origin
3884 (method git-fetch) ;no tests in pypi archive
3885 (uri (git-reference
3886 (url "https://github.com/eugeniy/pytest-tornado")
3887 (commit (string-append "v" version))))
3888 (file-name (git-file-name name version))
3889 (sha256
3890 (base32 "05hgq1m9g35kpc01im7ci1wd85xi1rdxnyms9izjg65c9976zn6x"))))
3891 (build-system pyproject-build-system)
3892 (native-inputs
3893 (list python-wheel))
3894 (propagated-inputs
3895 (list python-pytest
3896 python-setuptools
3897 python-tornado))
3898 (home-page "https://github.com/eugeniy/pytest-tornado")
3899 (synopsis "Pytest plugin to ease testing tornado applications")
3900 (description
3901 "This package provides a py.test plugin providing fixtures and markers to
3902simplify testing of asynchronous tornado applications.")
3903 (license license:asl2.0)))
3904
3905(define-public python-pytest-tornasync
3906 (package
3907 (name "python-pytest-tornasync")
3908 (version "0.6.0.post2")
3909 (source
3910 (origin
3911 (method url-fetch)
3912 (uri (pypi-uri "pytest-tornasync" version))
3913 (sha256
3914 (base32
3915 "0pdyddbzppkfqwa7g17sdfl4w2v1hgsky78l8f4c1rx2a7cvd0fp"))))
3916 (build-system python-build-system)
3917 (arguments
3918 `(#:tests? #false ; TODO: fails at "from test import MESSAGE, PAUSE_TIME"
3919 #:phases
3920 (modify-phases %standard-phases
3921 (replace 'check
3922 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3923 (when tests?
3924 (add-installed-pythonpath inputs outputs)
3925 (invoke "pytest" "--verbose")))))))
3926 (propagated-inputs
3927 (list python-pytest python-tornado-6))
3928 (home-page "https://github.com/eukaryote/pytest-tornasync")
3929 (synopsis "Pytest plugin for testing Tornado code")
3930 (description
3931 "This package provides a simple pytest plugin that provides some helpful
3932fixtures for testing Tornado (version 5.0 or newer) apps and easy handling of
3933plain (undecoratored) native coroutine tests.")
3934 (license license:expat)))
3935
3936(define-public python-pytest-trio
3937 (package
3938 (name "python-pytest-trio")
3939 (version "0.8.0")
3940 (source
3941 (origin
3942 (method url-fetch)
3943 (uri (pypi-uri "pytest-trio" version))
3944 (sha256
3945 (base32 "0bmmdyjqj5v4a637i4rzm55crv6v3nj268as6x9nr7m76rixnqw3"))))
3946 (build-system pyproject-build-system)
3947 (arguments
3948 (list
3949 ;; Tests are broken, see
3950 ;; <https://github.com/python-trio/pytest-trio/issues/84>.
3951 #:tests? #f))
3952 (native-inputs
3953 (list python-hypothesis
3954 python-pytest
3955 python-setuptools
3956 python-wheel))
3957 (propagated-inputs
3958 (list python-async-generator
3959 python-outcome
3960 python-pytest
3961 python-trio))
3962 (home-page "https://github.com/python-trio/pytest-trio")
3963 (synopsis "Pytest plugin for trio")
3964 (description
3965 "This is a pytest plugin to help you test projects that use Trio, a
3966friendly library for concurrency and async I/O in Python.")
3967 ;; Either license applies.
3968 (license (list license:expat license:asl2.0))))
3969
3970(define-public python-pytest-twisted
3971 (package
3972 (name "python-pytest-twisted")
3973 (version "1.14.3")
3974 (source
3975 (origin
3976 (method url-fetch)
3977 (uri (pypi-uri "pytest_twisted" version))
3978 (sha256
3979 (base32 "0gkz7ybdj45v4mmfyyryx6lz75hizi23zi9n5mcsdnqfpk5m1q9p"))))
3980 (build-system pyproject-build-system)
3981 (arguments
3982 (list
3983 #:test-flags
3984 #~(list "-k" (string-append
3985 ;; AssertionError
3986 "not test_sigint_for_regular_tests"
3987 ;; TimeoutExpired
3988 " and not test_sigint_for_inline_callbacks_tests"))))
3989 (propagated-inputs (list python-decorator python-greenlet))
3990 (native-inputs (list python-pytest
3991 python-setuptools
3992 python-twisted
3993 python-wheel))
3994 (home-page "https://github.com/pytest-dev/pytest-twisted")
3995 (synopsis "Twisted plugin for Pytest")
3996 (description "This package provides a Twisted plugin for Pytest.")
3997 (license license:bsd-3)))
3998
3999(define-public python-pytest-vcr
4000 ;; This commit fixes integration with pytest-5
4001 (let ((commit "4d6c7b3e379a6a7cba0b8f9d20b704dc976e9f05")
4002 (revision "1"))
4003 (package
4004 (name "python-pytest-vcr")
4005 (version (git-version "1.0.2" revision commit))
4006 (source
4007 (origin
4008 (method git-fetch)
4009 (uri (git-reference
4010 (url "https://github.com/ktosiek/pytest-vcr")
4011 (commit commit)))
4012 (file-name (git-file-name name version))
4013 (sha256
4014 (base32 "1yk988zi0la6zpcm3fff0mxf942di2jiymrfqas19nyngj5ygaqs"))))
4015 (build-system pyproject-build-system)
4016 (native-inputs (list python-urllib3 python-setuptools python-wheel))
4017 (propagated-inputs (list python-pytest python-vcrpy))
4018 (home-page "https://github.com/ktosiek/pytest-vcr")
4019 (synopsis "Plugin for managing VCR.py cassettes")
4020 (description
4021 "This package is a pytest plugin for managing VCR.py cassettes.")
4022 (license license:expat))))
4023
4024(define-public python-pytest-virtualenv
4025 (package
4026 (name "python-pytest-virtualenv")
4027 (version "1.8.0")
4028 (source
4029 (origin
4030 (method url-fetch)
4031 (uri (pypi-uri "pytest-virtualenv" version))
4032 (sha256
4033 (base32
4034 "1ig1jwgs89r9vxdr12fgxvv9r05bnf5d18lxyn13xciivwwi16al"))))
4035 (build-system pyproject-build-system)
4036 (arguments
4037 (list
4038 #:test-flags #~(list "--ignore=tests/integration/")
4039 #:phases
4040 #~(modify-phases %standard-phases
4041 ;; Reference the virtualenv executable directly, to avoid the need
4042 ;; for PYTHONPATH, which gets cleared when instantiating a new
4043 ;; virtualenv with pytest-virtualenv.
4044 (add-after 'unpack 'patch-virtualenv-executable
4045 (lambda* (#:key inputs #:allow-other-keys)
4046 (let* ((virtualenv #$(this-package-input "python-virtualenv"))
4047 (virtualenv-bin (string-append virtualenv
4048 "/bin/virtualenv")))
4049 (substitute* "pytest_virtualenv.py"
4050 (("^DEFAULT_VIRTUALENV_FIXTURE_EXECUTABLE.*$")
4051 (format #f "DEFAULT_VIRTUALENV_FIXTURE_EXECUTABLE = '~a'"
4052 virtualenv-bin)))))))))
4053 (native-inputs
4054 (list python-pytest
4055 python-setuptools
4056 python-setuptools-git
4057 python-wheel))
4058 (propagated-inputs
4059 (list python-importlib-metadata
4060 python-pytest-shutil
4061 python-pytest-fixture-config
4062 python-virtualenv))
4063 (home-page "https://github.com/man-group/pytest-plugins")
4064 (synopsis "Virtualenv fixture for py.test")
4065 (description "This package provides a virtualenv fixture for the py.test
4066framework.")
4067 (license license:expat)))
4068
4069(define-public python-pytest-xvfb
4070 (package
4071 (name "python-pytest-xvfb")
4072 (version "2.0.0")
4073 (source
4074 (origin
4075 (method url-fetch)
4076 (uri (pypi-uri "pytest-xvfb" version))
4077 (sha256
4078 (base32 "1kyq5rg27dsnj7dc6x9y7r8vwf8rc88y2ppnnw6r96alw0nn9fn4"))))
4079 (build-system python-build-system)
4080 (arguments
4081 `(#:test-target "pytest"
4082 #:phases
4083 (modify-phases %standard-phases
4084 (add-before 'build 'prepare-tests
4085 (lambda _
4086 (system "Xvfb &")
4087 (setenv "DISPLAY" ":0")
4088
4089 ;; This test is meant to run on Windows.
4090 (delete-file "tests/test_xvfb_windows.py")
4091 #t)))))
4092 (native-inputs
4093 (list python-pytest python-pytest-runner xorg-server-for-tests))
4094 (propagated-inputs
4095 (list python-pyvirtualdisplay))
4096 (home-page "https://github.com/The-Compiler/pytest-xvfb")
4097 (synopsis "Pytest plugin to run Xvfb for tests")
4098 (description
4099 "This package provides a Pytest plugin to run Xvfb for tests.")
4100 (license license:expat)))
4101
4102(define-public python-pyux
4103 (package
4104 (name "python-pyux")
4105 (version "0.0.6")
4106 (source
4107 (origin
4108 (method url-fetch)
4109 (uri (pypi-uri "pyux" version))
4110 (sha256
4111 (base32
4112 "1i17xh4dy238ibrjdgh8vn78fk5q6dj37mcznpvdfzidj57js7ca"))))
4113 (build-system python-build-system)
4114 (arguments
4115 `(#:tests? #f)) ;the mini test suite fails
4116 (home-page "https://github.com/farizrahman4u/pyux")
4117 (synopsis "Utility to check API integrity in Python libraries")
4118 (description "The pyux utility detects API changes in Python
4119libraries.")
4120 (license license:expat)))
4121
4122(define-public python-re-assert
4123 (package
4124 (name "python-re-assert")
4125 (version "1.1.0")
4126 (source
4127 (origin
4128 ;; There are no tests in the PyPI tarball.
4129 (method git-fetch)
4130 (uri (git-reference
4131 (url "https://github.com/asottile/re-assert")
4132 (commit (string-append "v" version))))
4133 (file-name (git-file-name name version))
4134 (sha256
4135 (base32 "1rssq4wpqmx1c17hjfx5l3sn3zmnlz9jffddiqrs4f6h7m6cadai"))))
4136 (build-system pyproject-build-system)
4137 (native-inputs
4138 (list python-pytest python-setuptools))
4139 (propagated-inputs
4140 (list python-regex))
4141 (home-page "https://github.com/asottile/re-assert")
4142 (synopsis "Show where your regex match assertion failed")
4143 (description
4144 "@code{re-assert} provides a helper class to make assertions of regexes
4145simpler.")
4146 (license license:expat)))
4147
4148(define-public python-respx
4149 (package
4150 (name "python-respx")
4151 (version "0.22.0")
4152 (source
4153 (origin
4154 ;; There are no tests in the PyPI tarball.
4155 (method git-fetch)
4156 (uri (git-reference
4157 (url "https://github.com/lundberg/respx/")
4158 (commit version)))
4159 (file-name (git-file-name name version))
4160 (sha256
4161 (base32 "0pl6vlyva837bnz3cy9mwmvvh8fq943rkrbq3mzj34bjf8swnw2g"))))
4162 (build-system pyproject-build-system)
4163 (arguments
4164 (list
4165 #:phases
4166 #~(modify-phases %standard-phases
4167 (add-after 'unpack 'fix-pytest-config
4168 (lambda _
4169 ;; Drop test coverage requirements.
4170 (substitute* "setup.cfg"
4171 (("--cov(-[^ ]*)?=[^ ]*")
4172 "\n")
4173 (("--cov-fail-under [^ ]*")
4174 "\n")))))))
4175 (propagated-inputs (list python-httpx))
4176 (native-inputs (list nss-certs-for-test
4177 python-starlette
4178 python-flask
4179 python-pytest
4180 python-pytest-asyncio
4181 python-setuptools
4182 python-wheel))
4183 (home-page "https://lundberg.github.io/respx/")
4184 (synopsis "Mocking for Python libraries HTTPX and HTTPCore")
4185 (description
4186 "This package provides a utility for mocking out the Python libraries HTTPX and
4187HTTPCore.")
4188 (license license:bsd-3)))
4189
4190(define-public python-robber
4191 (package
4192 (name "python-robber")
4193 (version "1.1.5")
4194 (source
4195 (origin
4196 (method url-fetch)
4197 (uri (pypi-uri "robber" version))
4198 (sha256
4199 (base32 "0xp5csgv2g9q38hscml6bc5i1nm4xy5lzqqiimm2drxsf0hw2nq5"))))
4200 (build-system pyproject-build-system)
4201 ;; There are no tests in the tarball downloaded from PyPI.
4202 ;; The last version tagged in Github (0.1.0) is older than the one on PyPI.
4203 ;; Reported upstream: <https://github.com/vesln/robber.py/issues/20>.
4204 (arguments
4205 '(#:tests? #f))
4206 (native-inputs (list python-setuptools python-wheel))
4207 (propagated-inputs (list python-mock python-termcolor))
4208 ;; URL of the fork used to generate the package available on PyPI.
4209 (home-page "https://github.com/EastAgile/robber.py")
4210 (synopsis "Test-driven development (TDD) assertion library for Python")
4211 (description "Robber is a Python assertion library for test-driven and
4212behavior-driven development (TDD and BDD).")
4213 (license license:expat)))
4214
4215(define-public python-robotframework-jsonlibrary
4216 (package
4217 (name "python-robotframework-jsonlibrary")
4218 (version "0.5")
4219 (source
4220 (origin
4221 (method git-fetch) ; no tests data in PyPi package
4222 (uri (git-reference
4223 (url (string-append "https://github.com/robotframework-thailand/"
4224 "robotframework-jsonlibrary"))
4225 (commit version)))
4226 (file-name (git-file-name name version))
4227 (sha256
4228 (base32 "1zkhcmwlp9gy9a0262ylykr9pljq9mpkaa69340hhfkzygzi30dc"))))
4229 (build-system pyproject-build-system)
4230 (native-inputs
4231 (list python-pytest
4232 python-setuptools
4233 python-wheel))
4234 (propagated-inputs
4235 (list python-jsonpath-ng
4236 python-jsonschema
4237 python-robotframework))
4238 (home-page "https://github.com/robotframework-thailand/robotframework-jsonlibrary")
4239 (synopsis "Robot Framework test library for manipulating JSON Object")
4240 (description
4241 "@code{robotframework-jsonlibrary} is a Robot Framework test library for
4242manipulating JSON Object. You can manipulate your JSON object using JSONPath")
4243 ;; This is free and unencumbered software released into the public domain.
4244 (license license:unlicense)))
4245
4246(define-public python-scspell3k
4247 (let ((commit "df550351f255c572c1a74852d233c83bbfbd49fb")
4248 (revision "0"))
4249 (package
4250 (name "python-scspell3k")
4251 (version (git-version "2.3.0" revision commit))
4252 (source
4253 (origin
4254 (method git-fetch)
4255 (uri (git-reference
4256 (url "https://github.com/myint/scspell")
4257 (commit commit)))
4258 (sha256
4259 (base32 "0d7yhja9hrw4w7vm10h56hm1dqyhrnwia7wzc3ap9f15ldkkp9cs"))
4260 (file-name (git-file-name name version))))
4261 (build-system pyproject-build-system)
4262 (arguments
4263 (list
4264 #:phases
4265 #~(modify-phases %standard-phases
4266 (add-after 'unpack 'fix-project-license
4267 (lambda _
4268 (substitute* "pyproject.toml"
4269 (("\"GPL-2.0-only\"")
4270 "{ text = \"GPL-2.0-only\" }"))))
4271 (add-before 'check 'pre-check
4272 (lambda _
4273 (setenv "HOME" "/tmp")))
4274 (add-after 'check 'run-cram-tests
4275 (lambda _
4276 (invoke "cram" "--indent=4" "--verbose" "./test.cram"))))))
4277 (native-inputs
4278 (list python-cram
4279 python-pytest
4280 python-setuptools
4281 python-wheel))
4282 (home-page "https://github.com/myint/scspell")
4283 (synopsis "Conservative interactive spell checker for source code")
4284 (description
4285 "This package implements a spell checker for source code that does not
4286try to be particularly smart and instead does the simplest thing that can
4287possibly work.")
4288 (license license:gpl2))))
4289
4290(define-public python-slotscheck
4291 (package
4292 (name "python-slotscheck")
4293 (version "0.19.0")
4294 (source
4295 (origin
4296 (method git-fetch)
4297 (uri (git-reference
4298 (url "https://github.com/ariebovenberg/slotscheck")
4299 (commit (string-append "v" version))))
4300 (file-name (git-file-name name version))
4301 (sha256
4302 (base32 "1lakwgk20aq92sqdwsswnll2w3y6p42x8abb9q8fc2qvw3xhw2vh"))))
4303 (build-system pyproject-build-system)
4304 (arguments
4305 (list
4306 ;; Optional: ModuleNotFoundError: No module named 'mypyc'
4307 #:test-flags #~(list "-k" "not test_extension_package")))
4308 (native-inputs
4309 (list python-poetry-core
4310 python-pytest
4311 python-pytest-mock
4312 python-ujson))
4313 (propagated-inputs
4314 (list python-click
4315 python-tomli))
4316 (home-page "https://github.com/ariebovenberg/slotscheck")
4317 (synopsis "Ensure @code{__slots__} are working properly")
4318 (description
4319 "@code{slotscheck} is a tool to validate Python class @code{__slots__}.")
4320 (license license:expat)))
4321
4322(define-public python-stestr
4323 (package
4324 (name "python-stestr")
4325 (version "4.2.0")
4326 (source
4327 (origin
4328 (method url-fetch)
4329 (uri (pypi-uri "stestr" version))
4330 (sha256
4331 (base32 "17623fqkg3a0z7rx8jcxwvgx6afg6wzvj4q6cgip5hqw5ngn7v25"))))
4332 (build-system pyproject-build-system)
4333 (arguments
4334 (list
4335 #:test-flags
4336 #~(list "--test-path" "stestr/tests"
4337 "--exclude-regex" (string-join
4338 (list "test_pass"
4339 "test_pass_list"
4340 "test_unexpected_pass"
4341 "test_load_from_stdin_quiet"
4342 "test_trace_with_all_skips")
4343 "|"))
4344 #:phases
4345 #~(modify-phases %standard-phases
4346 (add-before 'check 'configure-check
4347 (lambda _
4348 (setenv "HOME" (getcwd)))))))
4349 (native-inputs
4350 (list python-ddt
4351 python-iso8601
4352 python-flit-core
4353 python-setuptools))
4354 (propagated-inputs
4355 (list python-cliff-bootstrap
4356 python-fixtures
4357 python-pyyaml
4358 python-subunit
4359 python-testtools
4360 python-tomlkit
4361 python-voluptuous))
4362 (home-page "https://stestr.readthedocs.io/en/latest/")
4363 (synopsis "Parallel Python test runner")
4364 (description
4365 "This package provides the @command{stestr} command, a parallel Python
4366test runner built around @code{subunit}. It is designed to execute
4367@code{unittest} test suites using multiple processes to split up execution of
4368a test suite. It will also store a history of all test runs to help in
4369debugging failures and optimizing the scheduler to improve speed.")
4370 (license license:asl2.0)))
4371
4372(define-public python-sure
4373 ;; No release for 2y but the master branch has fresh changes, use the latest
4374 ;; commit for now, see <https://github.com/gabrielfalcao/sure/issues/184>,
4375 ;; <https://github.com/gabrielfalcao/sure/issues/182>.
4376 (let ((commit "acf823a2e240a2efe93360316d3816e90366439a")
4377 (revision "0"))
4378 (package
4379 (name "python-sure")
4380 (version (git-version "2.0.1" revision commit))
4381 (source
4382 (origin
4383 (method git-fetch)
4384 (uri (git-reference
4385 (url "https://github.com/gabrielfalcao/sure")
4386 (commit commit)))
4387 (file-name (git-file-name name version))
4388 (sha256
4389 (base32 "12qd3as4ixhwvf8ppx1dwhghda2kcb85ygd4x3ci9mbvkh25fs01"))))
4390 (build-system pyproject-build-system)
4391 (native-inputs
4392 (list python-mock
4393 python-pytest
4394 python-pytest-cov
4395 python-setuptools
4396 python-wheel))
4397 (propagated-inputs
4398 (list python-couleur))
4399 (home-page "https://github.com/gabrielfalcao/sure")
4400 (synopsis "Automated testing library in python for python")
4401 (description
4402 "Sure is a python library that leverages a DSL for writing
4403assertions. Sure is heavily inspired by @code{RSpec Expectations} and
4404@code{should.js}.")
4405 (license license:gpl3+))))
4406
4407(define-public python-sybil
4408 (package
4409 (name "python-sybil")
4410 (version "9.0.0")
4411 (source
4412 (origin
4413 (method git-fetch)
4414 (uri (git-reference
4415 (url "https://github.com/simplistix/sybil")
4416 (commit version)))
4417 (sha256
4418 (base32 "0r491k91fi2nb0kdd6di8cb2kxcvsk1xzw3sgwsxhhg4qynsp3bi"))))
4419 (build-system pyproject-build-system)
4420 (native-inputs (list python-mypy
4421 python-myst-parser
4422 python-pytest
4423 python-pytest-cov
4424 python-pyyaml
4425 python-seedir
4426 python-setuptools
4427 python-testfixtures
4428 python-wheel))
4429 (home-page "https://github.com/simplistix/sybil")
4430 (synopsis "Automated testing for examples in code and documentation")
4431 (description
4432 "This library provides a way to check examples in your code and
4433documentation by parsing them from their source and evaluating the
4434parsed examples as part of your normal test run. Integration is
4435provided for the main Python test runners.")
4436 (license license:expat)))
4437
4438(define-public python-syrupy
4439 (package
4440 (name "python-syrupy")
4441 (version "5.0.0")
4442 (source
4443 (origin
4444 (method git-fetch)
4445 (uri (git-reference
4446 (url "https://github.com/syrupy-project/syrupy")
4447 (commit (string-append "v" version))))
4448 (file-name (git-file-name name version))
4449 (sha256
4450 (base32 "1ysm42an2pf4ppd1i5yzh11bq1rfydhg6rmmh5v91gcixpvi872d"))))
4451 (build-system pyproject-build-system)
4452 (arguments
4453 (list #:test-backend #~'custom
4454 #:test-flags #~(list "-m" "invoke" "test")))
4455 (native-inputs
4456 (list python-invoke
4457 python-poetry-core
4458 python-pytest-bootstrap
4459 python-pytest-xdist
4460 python-setuptools-scm))
4461 (home-page "https://github.com/syrupy-project/syrupy")
4462 (synopsis "Pytest Snapshot Test Utility")
4463 (description
4464 "This package implements a functionality to write tests which assert
4465immutability of computed results.")
4466 (license license:asl2.0)))
4467
4468(define-public python-tappy
4469 (package
4470 (name "python-tappy")
4471 (version "3.2.1")
4472 (source
4473 (origin
4474 (method url-fetch)
4475 (uri (pypi-uri "tap_py" version))
4476 (sha256
4477 (base32 "026n47b46z07yh5z5vpffcfq2xp6850g2s8w9ycssvx5y1m9wg6h"))))
4478 (build-system pyproject-build-system)
4479 (arguments (list #:test-backend #~'custom
4480 #:test-flags #~(list "tests/run.py")))
4481 (native-inputs (list python-hatchling))
4482 (home-page "https://github.com/python-tap/tappy")
4483 (synopsis "Tools for Test Anything Protocol")
4484 (description "Tappy is a set of tools for working with the Test Anything
4485Protocol (TAP) in Python. TAP is a line based test protocol for recording test
4486data in a standard way.")
4487 (license license:bsd-3)))
4488
4489(define-public python-test-utils
4490 (package
4491 (name "python-test-utils")
4492 (version "0.1.0")
4493 (source
4494 (origin
4495 (method url-fetch)
4496 (uri (pypi-uri "test-utils" version))
4497 (sha256
4498 (base32 "0cs0gyihnkj8ya4yg3ld3ly73mpxrkn2gq9acamclhqvhxsv7zd6"))))
4499 (build-system pyproject-build-system)
4500 (arguments
4501 (list #:tests? #f)) ; No tests, neither on pypi nor upstream.
4502 (native-inputs (list python-setuptools))
4503 (home-page "https://github.com/Kami/python-test-utils/")
4504 (synopsis "Utilities for functional and integration tests")
4505 (description
4506 "This package provides a collection of utility functions and classes
4507which make writing and running functional and integration tests easier.")
4508 (license license:asl2.0)))
4509
4510(define-public python-test2ref
4511 (package
4512 (name "python-test2ref")
4513 (version "1.1.1")
4514 (source
4515 (origin
4516 (method url-fetch)
4517 (uri (pypi-uri "test2ref" version))
4518 (sha256
4519 (base32 "1jx7cdqwpyq3gs9czvz0fwijkqhvmbny5h3zgdqlbrw8y3miv4gq"))))
4520 (build-system pyproject-build-system)
4521 (native-inputs
4522 (list python-pdm-backend
4523 python-pytest
4524 python-pytest-cov))
4525 (propagated-inputs
4526 (list python-binaryornot))
4527 (home-page "https://github.com/nbiotcloud/test2ref")
4528 (synopsis "Testing Against Learned Reference Data")
4529 (description
4530 "This package provides a unit tests framework backed by ML features and
4531working in two modes:
4532
4533@itemize
4534@item Testing: Test result in @code{tmp_path} is compared against a known
4535reference. Any deviation in the files, causes a fail.
4536@item Learning: The test result in @code{tmp_path} is taken as reference and
4537is copied to the reference folder, which should be committed to version
4538control and kept as reference.
4539@end itemize")
4540 (license license:expat)))
4541
4542(define-public python-testfixtures
4543 (package
4544 (name "python-testfixtures")
4545 (version "9.1.0")
4546 (source
4547 (origin
4548 (method url-fetch)
4549 (uri (pypi-uri "testfixtures" version))
4550 (sha256
4551 (base32 "10hlw2y1rjzmfm87dlisbiwf0zyjbnj0q471799j69wlagrrqzji"))))
4552 (build-system pyproject-build-system)
4553 (arguments
4554 `(#:tests? #f)) ; PyTest-Django fails to build in master
4555 (native-inputs
4556 (list python-setuptools))
4557 (home-page "https://testfixtures.readthedocs.io/en/latest/")
4558 (synopsis "Tests components for Python")
4559 (description
4560 "Testfixtures is a collection of helpers and mock objects that are useful
4561when writing automated tests in Python.")
4562 (license license:expat)))
4563
4564(define-public python-time-machine
4565 (package
4566 (name "python-time-machine")
4567 (version "2.16.0")
4568 (source
4569 (origin
4570 (method url-fetch)
4571 (uri (pypi-uri "time_machine" version))
4572 (sha256
4573 (base32 "1qn7cj9lx3m7pwa8ak1106f9c54yvpa996x84gfqmyfjfg1ar6aa"))))
4574 (build-system pyproject-build-system)
4575 (arguments
4576 `(#:tests? #f)) ;no tests in PyPI archive
4577 (propagated-inputs (list python-dateutil))
4578 (native-inputs (list python-setuptools python-wheel))
4579 (home-page "https://github.com/adamchainz/time-machine")
4580 (synopsis "Travel through time in your tests.")
4581 (description "This package lets you set a different time for your tests.")
4582 (license license:expat)))
4583
4584(define-public python-tox
4585 ;; NOTE: Try to avoid including it in inputs, it's for the local development
4586 ;; only.
4587 (package
4588 (name "python-tox")
4589 (version "4.23.2")
4590 (source
4591 (origin
4592 (method url-fetch)
4593 (uri (pypi-uri "tox" version))
4594 (sha256
4595 (base32
4596 "0b2a5wrjwryjzg58v1mwzx3wn7pr2wwk7z2cwy16xpsmwl05w1w6"))))
4597 (build-system pyproject-build-system)
4598 (arguments
4599 (list
4600 #:test-flags
4601 #~(list "-k" (string-join
4602 ;; These freeze the test suite
4603 (list "not test_parallel"
4604 "test_parallel_live"
4605 ;; Needs internet access
4606 "test_build_wheel_external"
4607 "test_run_installpkg_targz"
4608 "test_python_generate_hash_seed"
4609 ;; XXX Tries to call python-wrapper-3.10.7/bin/tox
4610 "test_call_as_exe"
4611 ;; assert 'covdefaults>=1.2; python_version == "2.7"
4612 ;; or python_version == "3.11"' == 'sphinx>=3'
4613 "test_load_dependency_many_extra")
4614 " and not "))))
4615 (propagated-inputs
4616 (list python-cachetools
4617 python-chardet
4618 python-colorama
4619 python-filelock
4620 python-packaging
4621 python-platformdirs
4622 python-pluggy
4623 python-pyproject-api
4624 python-tomli
4625 python-typing-extensions
4626 python-virtualenv))
4627 (native-inputs
4628 (list python-devpi-process
4629 python-flaky
4630 python-hatch-vcs
4631 python-hatchling
4632 python-psutil
4633 python-pytest
4634 python-pytest-mock
4635 python-pytest-xdist
4636 python-re-assert
4637 python-time-machine
4638 python-wheel))
4639 (home-page "https://tox.readthedocs.io")
4640 (synopsis "Virtualenv-based automation of test activities")
4641 (description "Tox is a generic virtualenv management and test command line
4642tool. It can be used to check that a package installs correctly with
4643different Python versions and interpreters, or run tests in each type of
4644supported environment, or act as a frontend to continuous integration
4645servers.")
4646 (license license:expat)))
4647
4648(define-public python-validate-pyproject
4649 (package
4650 (name "python-validate-pyproject")
4651 (version "0.24.1")
4652 (source
4653 (origin
4654 (method url-fetch)
4655 (uri (pypi-uri "validate_pyproject" version))
4656 (sha256
4657 (base32 "0wbbksrfaxc2c7y305wjinkk4y1jxdnc0vzfbf79ipaa6m8zr0p1"))))
4658 (build-system pyproject-build-system)
4659 (arguments
4660 (list
4661 #:test-flags
4662 ;; TODO: Full test suite requires schemas from
4663 ;; <https://json.schemastore.org/pyproject.json> and obtained during CI
4664 ;; just before running tests, figure out how to get schema files to
4665 ;; cover all test cases, see <tools/cache_urls_for_tests.py> and
4666 ;; <.github/workflows/ci.yml>.
4667 #~(list "--ignore=tests/test_examples.py"
4668 "--ignore=tests/test_pre_compile.py"
4669 "-k" (string-join
4670 (list "not test_downloaded"
4671 "test_valid_download_only_once"
4672 "test_cache_open_url")
4673 " and not "))))
4674 (native-inputs
4675 (list python-pytest
4676 python-packaging
4677 python-pytest-cov
4678 python-setuptools
4679 python-setuptools-scm
4680 python-trove-classifiers
4681 python-wheel))
4682 (propagated-inputs
4683 (list python-fastjsonschema))
4684 (home-page "https://github.com/abravalheri/validate-pyproject/")
4685 (synopsis "Validation library for simple check on @code{pyproject.toml}")
4686 (description
4687 "Validation library and CLI tool for checking on @code{pyproject.toml}
4688files using JSON Schema.")
4689 (license (list license:mpl2.0
4690 license:expat
4691 license:bsd-3))))
4692
4693(define-public python-vcrpy
4694 (package
4695 (name "python-vcrpy")
4696 (version "7.0.0")
4697 (source
4698 (origin
4699 (method url-fetch)
4700 (uri (pypi-uri "vcrpy" version))
4701 (sha256
4702 (base32 "0l1sdfc51024jclqv9104nagpirxx8w0gcn5h0bdxv950jnr2qqp"))))
4703 (build-system pyproject-build-system)
4704 (arguments
4705 (list
4706 #:test-flags
4707 #~(list "--ignore=tests/integration"
4708 "-k" (string-join
4709 ;; These tests require network access.
4710 (list "not testing_connect"
4711 "test_get_vcr_with_matcher"
4712 "test_testcase_playback")
4713 " and not "))))
4714 (native-inputs
4715 (list python-aiohttp
4716 python-boto3
4717 python-httplib2
4718 python-httpx
4719 python-pytest
4720 python-pytest-cov
4721 python-pytest-aiohttp
4722 python-pytest-asyncio
4723 python-pytest-httpbin
4724 python-requests
4725 python-setuptools
4726 python-tornado
4727 python-urllib3
4728 python-werkzeug
4729 python-wheel))
4730 (propagated-inputs
4731 (list python-pyyaml python-wrapt python-yarl))
4732 (home-page "https://github.com/kevin1024/vcrpy")
4733 (synopsis "Automatically mock your HTTP interactions")
4734 (description
4735 "VCR.py simplifies and speeds up tests that make HTTP requests. The first
4736time you run code that is inside a VCR.py context manager or decorated function,
4737VCR.py records all HTTP interactions that take place through the libraries it
4738supports and serializes and writes them to a flat file (in yaml format by
4739default). This flat file is called a cassette. When the relevant piece of code
4740is executed again, VCR.py will read the serialized requests and responses from
4741the aforementioned cassette file, and intercept any HTTP requests that it
4742recognizes from the original test run and return the responses that corresponded
4743to those requests. This means that the requests will not actually result in
4744HTTP traffic, which confers several benefits including:
4745@enumerate
4746@item The ability to work offline
4747@item Completely deterministic tests
4748@item Increased test execution speed
4749@end enumerate
4750If the server you are testing against ever changes its API, all you need to do
4751is delete your existing cassette files, and run your tests again. VCR.py will
4752detect the absence of a cassette file and once again record all HTTP
4753interactions, which will update them to correspond to the new API.")
4754 (license license:expat)))
4755
4756(define-public python-vulture
4757 (package
4758 (name "python-vulture")
4759 (version "2.14")
4760 (source
4761 (origin
4762 (method url-fetch)
4763 (uri (pypi-uri "vulture" version))
4764 (sha256
4765 (base32 "05c4kfg6s2zf7lzplq53ihjf19knf3pmpv4nnzmdwf0i5a87g0nb"))))
4766 (build-system pyproject-build-system)
4767 (arguments
4768 (list
4769 #:test-flags
4770 #~(list "-k" (string-join
4771 (list
4772 ;; Skip test that uses python-pint pint has many
4773 ;; dependencies.
4774 "not test_whitelists_with_python"
4775 ;; FileNotFoundError: [Errno 2] No such file or
4776 ;; directory: 'pytype'
4777 "test_pytype")
4778 " and not "))))
4779 (native-inputs
4780 (list python-pytest
4781 python-setuptools
4782 python-wheel))
4783 (propagated-inputs
4784 (list python-toml))
4785 (home-page "https://github.com/jendrikseipp/vulture")
4786 (synopsis "Find dead Python code")
4787 (description
4788 "Vulture finds unused code in Python programs. This is useful for
4789cleaning up and finding errors in large code bases. If you run Vulture on
4790both your library and test suite you can find untested code. Due to Python's
4791dynamic nature, static code analyzers like Vulture are likely to miss some
4792dead code. Also, code that is only called implicitly may be reported as
4793unused.")
4794 (license license:expat)))
4795
4796(define-public python-xdoctest
4797 (package
4798 (name "python-xdoctest")
4799 (version "1.3.0")
4800 (source
4801 (origin
4802 (method url-fetch)
4803 (uri (pypi-uri "xdoctest" version))
4804 (sha256
4805 (base32 "1m69yvc3bl9jj5av89p9jl08w9lsn0k3lqclpdbiq0g67fdbjb7r"))))
4806 (build-system pyproject-build-system)
4807 (arguments
4808 (list
4809 #:phases
4810 #~(modify-phases %standard-phases
4811 (add-before 'check 'pre-check
4812 (lambda _
4813 ;; A writable HOME is needed by the 'import_module_from_path'
4814 ;; test.
4815 (setenv "HOME" "/tmp"))))))
4816 (native-inputs
4817 (list cmake-minimal
4818 ninja
4819 pybind11
4820 python-pytest-bootstrap
4821 python-scikit-build
4822 python-setuptools))
4823 (home-page "https://github.com/Erotemic/xdoctest")
4824 (synopsis "Rewrite of the Python builtin doctest module")
4825 (description
4826 "This package provides a rewrite of the builtin doctest module which
4827 leverages the Python @acronym{AST, Abstract Syntax Tree} instead of
4828@acronym{REGEXPs, regular expressions}.")
4829 (license license:asl2.0)))
4830
4831(define-public python-xunitparser
4832 (package
4833 (name "python-xunitparser")
4834 (version "1.3.4")
4835 (source
4836 (origin
4837 (method url-fetch)
4838 (uri (pypi-uri "xunitparser" version))
4839 (sha256
4840 (base32 "00lapxi770mg7jkw16zy3a91hbdfz4a9h43ryczdsgd3z4cl6vyf"))))
4841 (build-system python-build-system)
4842 (arguments
4843 `(#:phases
4844 (modify-phases %standard-phases
4845 ;; See https://github.com/laurentb/xunitparser/pull/11
4846 (add-after 'unpack 'fix-test-suite
4847 (lambda _
4848 (substitute* "xunitparser.py"
4849 (("(^ +)self.stderr = None" m indent)
4850 (string-append m "\n" indent "self._cleanup = False\n"))))))))
4851 (home-page "http://git.p.engu.in/laurentb/xunitparser/")
4852 (synopsis "Read JUnit/XUnit XML files and map them to Python objects")
4853 (description "xunitparser reads a JUnit/XUnit XML file and maps it to
4854Python objects. It tries to use the objects available in the standard
4855@code{unittest} module.")
4856 (license license:expat)))
4857
4858(define-public python-xvfbwrapper
4859 (package
4860 (name "python-xvfbwrapper")
4861 (version "0.2.9")
4862 (source (origin
4863 (method url-fetch)
4864 (uri (pypi-uri "xvfbwrapper" version))
4865 (sha256
4866 (base32
4867 "097wxhvp01ikqpg1z3v8rqhss6f1vwr399zpz9a05d2135bsxx5w"))))
4868 (build-system python-build-system)
4869 (propagated-inputs (list xorg-server-for-tests))
4870 (home-page "https://github.com/cgoldberg/xvfbwrapper")
4871 (synopsis "Python module for controlling virtual displays with Xvfb")
4872 (description
4873 "Xvfb (X virtual framebuffer) is a display server implementing
4874the X11 display server protocol. It runs in memory and does not require a
4875physical display. Only a network layer is necessary. Xvfb is useful for
4876running acceptance tests on headless servers.")
4877 (license license:expat)))