From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: [PATCH 3/4] gnu: Add python-pytest-subtesthack. Date: Sun, 31 Jan 2016 19:08:42 -0500 Message-ID: <0ae50198e4e36bc75ad822bfc99d1c6aaa9ed766.1454285257.git.leo@famulari.name> References: Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQ233-0008R1-4C for guix-devel@gnu.org; Sun, 31 Jan 2016 19:08:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQ22z-0005om-Vr for guix-devel@gnu.org; Sun, 31 Jan 2016 19:08:53 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:49588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQ22z-0005oF-T8 for guix-devel@gnu.org; Sun, 31 Jan 2016 19:08:49 -0500 Received: from jasmine.lan (c-69-249-5-231.hsd1.pa.comcast.net [69.249.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 1ACBCC00014 for ; Sun, 31 Jan 2016 19:08:48 -0500 (EST) In-Reply-To: In-Reply-To: References: 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org * gnu/packages/python.scm (python-pytest-subtesthack, python2-pytest-subtesthack): New variables. --- gnu/packages/python.scm | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 98be464..41dd5cc 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -37,7 +37,8 @@ #:use-module ((guix licenses) #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+ - isc mpl2.0 psfl public-domain x11-style zpl2.1)) + isc mpl2.0 psfl public-domain unlicense x11-style + zpl2.1)) #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:) #:use-module (gnu packages) #:use-module (gnu packages attr) @@ -7282,3 +7283,30 @@ seamlessly into your existing Python unit testing work flow.") (define-public python2-hypothesis (package-with-python2 python-hypothesis)) + +(define-public python-pytest-subtesthack + (package + (name "python-pytest-subtesthack") + (version "0.1.1") + (source (origin + (method url-fetch) + (uri (pypi-uri "pytest-subtesthack" version)) + (sha256 + (base32 + "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x")))) + (build-system python-build-system) + (native-inputs + `(;; setuptools required for python-2 variant + ("python-setuptools" ,python-setuptools))) + (propagated-inputs + `(("python-pytest" ,python-pytest))) + (synopsis "Explicitly set up and tear down fixtures") + (description "This plugin allows you to set up and tear down fixtures within +the test function itself. This is useful for using @command{hypothesis} inside +py.test, as @command{hypothesis} will call the test function multiple times, +without setting up or tearing down fixture state as is normally the case.") + (home-page "https://github.com/untitaker/pytest-subtesthack/") + (license unlicense))) + +(define-public python2-pytest-subtesthack + (package-with-python2 python-pytest-subtesthack)) -- 2.6.3