projects/guix·blob kde-team · refs

5693 lines · 208.3 KiB

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