guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: Add python-pytest-random-order.


From: guix-commits
Subject: branch master updated: gnu: Add python-pytest-random-order.
Date: Mon, 27 Sep 2021 23:11:47 -0400

This is an automated email from the git hooks/post-receive script.

apteryx pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 8f8eaf5  gnu: Add python-pytest-random-order.
8f8eaf5 is described below

commit 8f8eaf579fe6903683efeea7a0cb806e38a8e5ee
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Mon Sep 27 23:10:08 2021 -0400

    gnu: Add python-pytest-random-order.
    
    * gnu/packages/check.scm (python-pytest-random-order): New variable.
---
 gnu/packages/check.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 9044d65..d763c92 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1213,6 +1213,36 @@ supports coverage of subprocesses.")
 contacting the real http server.")
     (license license:expat)))
 
+(define-public python-pytest-random-order
+  (package
+    (name "python-pytest-random-order")
+    (version "1.0.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-random-order" version))
+       (sha256
+        (base32 "0lpzl218l04vjy4gckrbrcacc3w9xrjnvz64bf2i132c58s5j8bb"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (replace 'check
+                    (lambda* (#:key tests? #:allow-other-keys)
+                      (when tests?
+                        (invoke "python" "-m" "pytest" "--random-order")))))))
+    (propagated-inputs
+     `(("python-pytest" ,python-pytest)))
+    (home-page "https://github.com/jbasko/pytest-random-order";)
+    (synopsis "Pytest plugin to randomize the order of tests")
+    (description "@code{pytest-random-order} is a Pytest plugin that
+randomizes the order of tests.  This can be useful to detect a test that
+passes just because it happens to run after an unrelated test that leaves the
+system in a favourable state.  The plugin allows user to control the level of
+randomness they want to introduce and to disable reordering on subsets of
+tests.  Tests can be rerun in a specific order by passing a seed value
+reported in a previous test run.")
+    (license license:expat)))
+
 (define-public python-pytest-runner
   (package
     (name "python-pytest-runner")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]