[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/16: gnu: Add python-pytest-mock.
From: |
Efraim Flashner |
Subject: |
04/16: gnu: Add python-pytest-mock. |
Date: |
Sun, 18 Sep 2016 20:19:58 +0000 (UTC) |
efraim pushed a commit to branch master
in repository guix.
commit 44547e51530e93ac6215bd32f2ee9e00b426544d
Author: Efraim Flashner <address@hidden>
Date: Sun Sep 11 21:25:59 2016 +0300
gnu: Add python-pytest-mock.
* gnu/packages/python.scm (python-pytest-mock): New variable.
---
gnu/packages/python.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 86d099a..590a056 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1684,6 +1684,45 @@ supports coverage of subprocesses.")
(define-public python2-pytest-runner
(package-with-python2 python-pytest-runner))
+(define-public python-pytest-mock
+ (package
+ (name "python-pytest-mock")
+ (version "1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest-mock" version ".zip"))
+ (sha256
+ (base32
+ "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (inputs
+ `(("python-py" ,python-py)
+ ("python-pytest" ,python-pytest)))
+ (home-page "https://github.com/pytest-dev/pytest-mock/")
+ (synopsis "Thin-wrapper around the mock package for easier use with
py.test")
+ (description
+ "This plugin installs a @code{mocker} fixture which is a thin-wrapper
+around the patching API provided by the @code{mock} package, but with the
+benefit of not having to worry about undoing patches at the end of a test.
+The mocker fixture has the same API as @code{mock.patch}, supporting the
+same arguments.")
+ (properties `((python2-variant . ,(delay python2-pytest-mock))))
+ (license license:expat)))
+
+(define-public python2-pytest-mock
+ (let ((base (package-with-python2
+ (strip-python2-variant python-pytest-mock))))
+ (package (inherit base)
+ (native-inputs
+ `(("python2-setuptools" ,python2-setuptools)
+ ,@(package-native-inputs base)))
+ (inputs
+ `(("python2-mock" ,python2-mock)
+ ,@(package-inputs base))))))
+
(define-public python-pytest-xdist
(package
(name "python-pytest-xdist")
- branch master updated (bff8be8 -> b8ea520), Efraim Flashner, 2016/09/18
- 05/16: gnu: Add python-graphql-core., Efraim Flashner, 2016/09/18
- 14/16: gnu: Add python-bcrypt., Efraim Flashner, 2016/09/18
- 01/16: gnu: Add python-pika., Efraim Flashner, 2016/09/18
- 09/16: gnu: Add python-django-filter., Efraim Flashner, 2016/09/18
- 02/16: gnu: Add python-peewee., Efraim Flashner, 2016/09/18
- 06/16: gnu: Add python-graphql-relay., Efraim Flashner, 2016/09/18
- 04/16: gnu: Add python-pytest-mock.,
Efraim Flashner <=
- 16/16: gnu: Add onionshare., Efraim Flashner, 2016/09/18
- 03/16: gnu: Add python-promise., Efraim Flashner, 2016/09/18
- 11/16: gnu: Add python-consul., Efraim Flashner, 2016/09/18
- 08/16: gnu: Add python-pytest-django., Efraim Flashner, 2016/09/18
- 13/16: gnu: Add python-nose2., Efraim Flashner, 2016/09/18
- 07/16: gnu: Add python-sqlalchemy-utils., Efraim Flashner, 2016/09/18
- 15/16: gnu: Add python-nautilus., Efraim Flashner, 2016/09/18
- 10/16: gnu: Add python-graphene., Efraim Flashner, 2016/09/18
- 12/16: gnu: Add python-cov-core., Efraim Flashner, 2016/09/18