projects/guix·blob rename-kernel-team · refs

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