projects/guix·blob java-team · refs

5635 lines · 206.4 KiB

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