From mboxrd@z Thu Jan 1 00:00:00 1970 From: Muriithi Frederick Muriuki Subject: [PATCH 14/20] gnu: Add python-nose-randomly Date: Fri, 14 Apr 2017 13:13:14 +0300 Message-ID: <20170414101320.11755-14-fredmanglis@gmail.com> References: <20170414101320.11755-1-fredmanglis@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyyEN-00016u-Dv for guix-devel@gnu.org; Fri, 14 Apr 2017 06:13:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cyyEK-0005ZP-Uc for guix-devel@gnu.org; Fri, 14 Apr 2017 06:13:31 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:33677) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cyyEK-0005YC-OF for guix-devel@gnu.org; Fri, 14 Apr 2017 06:13:28 -0400 Received: by mail-wr0-x241.google.com with SMTP id l28so11967685wre.0 for ; Fri, 14 Apr 2017 03:13:28 -0700 (PDT) In-Reply-To: <20170414101320.11755-1-fredmanglis@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Cc: pjotr2017@thebird.nl * 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