projects/guix·blob ocaml-team · refs

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