* gnu/packages/python.scm (python-nose-randomly): New variable.
---
 gnu/packages/python.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 7aba1ca..37b736e 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -14311,3 +14311,41 @@ and correct.")
 
 (define-public python2-rednose-0.4.3
   (package-with-python2 python-rednose-0.4.3))
+
+(define-public python-nose-randomly
+  (package
+    (name "python-nose-randomly")
+    (version "1.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "nose-randomly" version))
+       (sha256
+        (base32
+         "17iggrvhvxzgci34x14x31i1ym8f7jdkklmq1yfnwjcglh7z70hk"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-nose" ,python-nose)))
+    (home-page
+     "https://github.com/adamchainz/nose-randomly";)
+    (synopsis
+     "Nose plugin to randomly order tests and control random.seed")
+    (description
+     "Nose plugin to randomly order tests and control random.seed.  It has the 
following
+features:
+@itemize @bullet
+@item Randomly shuffles the submodules, @code{TestCase} classes + test 
functions when
+loading a module of tests.
+@item Randomly shuffles the test functions inside a @code{TestCase} when 
loading it.
+@item Resets @code{random.seed()} at the start of every test case and test to 
a fixed
+number - this defaults to @code{time.time()} from the start of your test run, 
but you can
+pass in @code{--randomly-seed} to repeat a randomness-induced failure.
+@item If @code{factory boy} is installed, its random state is reset at the 
start of every
+test.  This allows for repeatable use of its random @code{fuzzy} features.
+@item If @code{faker} is installed, its random state is reset at the start of 
every test.
+This is also for repeatable fuzzy data in tests - factory boy uses faker for 
lots of data.
+@end itemize")
+    (license license:bsd-3)))
+
+(define-public python2-nose-randomly
+  (package-with-python2 python-nose-randomly))
-- 
2.10.2


Reply via email to