projects/guix·blob librewolf-updates · refs

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