projects/guix·blob bootstrap-team · refs

5124 lines · 185.0 KiB

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