[PATCH 2/2] gnu: Add python-pytest-mp.

  • Done
  • quality assurance status badge
Details
2 participants
  • Hartmut Goebel
  • Ludovic Courtès
Owner
unassigned
Submitted by
Hartmut Goebel
Severity
normal
H
H
Hartmut Goebel wrote on 25 May 2021 10:36
(address . guix-patches@gnu.org)
7a6f8d0a36821597ebc833cd6ce2fdfcf6d309d7.1621931753.git.h.goebel@crazy-compilers.com
* gnu/packages/python-check.scm (python-pytest-mp): New variable.
---
gnu/packages/python-check.scm | 39 ++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index f0b454eec9..19e87d3ab7 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
-;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2019, 2021 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
@@ -1463,3 +1463,40 @@ allows one to create a set of tests using @emph{pairwise combinations} method,
reducing a number of combinations of variables into a lesser set that covers
most situations.")
(license license:expat)))
+
+(define-public python-pytest-mp
+ (package
+ (name "python-pytest-mp")
+ (version "0.0.4p2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ansible/pytest-mp")
+ (commit "49a8ff2ca9ef62d8c86854ab31d6b5d5d6cf3f28")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "01v98b6n3yvkfmxf2v38xk5ijqlk6ika0yljwkhl5bh6qhq23498"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-pytest" ,python-pytest)
+ ("python-psutil" ,python-psutil)))
+ (arguments
+ ;; tests require setuptools-markdown, which is deprecated and not in guix
+ '(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'remove-useless-requirements
+ (lambda _
+ (substitute* "setup.py"
+ ((" setup_requires=") " #")))))))
+ (home-page "https://github.com/ansible/pytest-mp")
+ (synopsis "Multiprocess and Segregate Tests")
+ (description "pytest-mp is a minimalist approach to distributing and
+segregating pytest tests across processes using python's multiprocessing
+library and is heavily inspired by pytest-concurrent and pytest-xdist. As a
+very early beta, it doesn't pledge or intend to support the majority of
+platforms or use cases. Design is based on supporting slow, io-bound testing
+with often tedious system under test configuration that can benefit from
+running several tests at one time.")
+ (license license:expat)))
--
2.30.2
L
L
Ludovic Courtès wrote on 5 Jun 2021 22:33
(name . Hartmut Goebel)(address . h.goebel@crazy-compilers.com)(address . 48645@debbugs.gnu.org)
87pmx0m4p8.fsf_-_@gnu.org
Hi,

Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

Toggle quote (2 lines)
> * gnu/packages/python-check.scm (python-pytest-mp): New variable.

[...]

Toggle quote (4 lines)
> + (arguments
> + ;; tests require setuptools-markdown, which is deprecated and not in guix
> + '(#:tests? #f

“Not in Guix” is generally not a valid excuse, but OK. ;-)

Toggle quote (3 lines)
> + (synopsis "Multiprocess and Segregate Tests")

I cannot parse this (“segregate” is not an adjective); could you
rephrase it? Please avoid capitals when unnecessary.

OK to push with a change along these lines, thanks!

Ludo’.
H
H
Hartmut Goebel wrote on 6 Jun 2021 17:54
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 48645@debbugs.gnu.org)
a1e66981-07f4-37b9-f031-83d4456989c5@crazy-compilers.com
Pushed as 5d4bd2ee94075a1c9abb12d16c62edddf9bb006c

Thanks for the review.

Toggle quote (5 lines)
>> + (arguments
>> + ;; tests require setuptools-markdown, which is deprecated and not in guix
>> + '(#:tests? #f
> “Not in Guix” is generally not a valid excuse, but OK. ;-)

Agreed :-)


--
Regards
Hartmut Goebel

| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
H
H
Hartmut Goebel wrote on 6 Jun 2021 17:59
(address . 48645-close@debbugs.gnu.org)
60ea935c-9c5d-cf77-6fce-09a1b29b8c0d@crazy-compilers.com

?