summaryrefslogtreecommitdiff
path: root/devel/py-mock
diff options
context:
space:
mode:
authorwen <wen>2012-12-02 13:12:28 +0000
committerwen <wen>2012-12-02 13:12:28 +0000
commit88b2005f2d61fbd0e3db8c615a55b4fc9e243e9e (patch)
treee02b0ac88e017a9cdc603645785e5d0fd1888316 /devel/py-mock
parent4ad81ff235068eb9430df51ec516ff25da91cfe2 (diff)
downloadpkgsrc-88b2005f2d61fbd0e3db8c615a55b4fc9e243e9e.tar.gz
Update to 1.0.1
Upstream changes: 2012/11/5 Version 1.0.1 Functions decorated with patch variants have a __wrapped__ attribute pointing to the original function. This brings compatibility with the default behaviour in Python 3.3 (due to a new feature in functools.wraps). Note that due to changes in tox, mock is no longer tested with Python 2.4. The compatibility code has not been removed so it probably still works, but tests are no longer run. 2012/10/07 Version 1.0.0 No changes since 1.0.0 beta 1. This version has feature parity with unittest.mock in Python 3.3. Full list of changes since 0.8: mocksignature, along with the mocksignature argument to patch, removed Support for deleting attributes (accessing deleted attributes will raise an AttributeError) Added the mock_open helper function for mocking the builtin open __class__ is assignable, so a mock can pass an isinstance check without requiring a spec Addition of PropertyMock, for mocking properties MagicMocks made unorderable by default (in Python 3). The comparison methods (other than equality and inequality) now return NotImplemented Propagate traceback info to support subclassing of _patch by other libraries create_autospec works with attributes present in results of dir that can’t be fetched from the object’s class. Contributed by Konstantine Rybnikov Any exceptions in an iterable side_effect will be raised instead of returned In Python 3, create_autospec now supports keyword only arguments Added patch.stopall method to stop all active patches created by start BUGFIX: calling MagicMock.reset_mock wouldn’t reset magic method mocks BUGFIX: calling reset_mock on a MagicMock created with autospec could raise an exception BUGFIX: passing multiple spec arguments to patchers (spec , spec_set and autospec) had unpredictable results, now it is an error BUGFIX: using spec=True and create=True as arguments to patchers could result in using DEFAULT as the spec. Now it is an error instead BUGFIX: using spec or autospec arguments to patchers, along with spec_set=True did not work correctly BUGFIX: using an object that evaluates to False as a spec could be ignored BUGFIX: a list as the spec argument to a patcher would always result in a non-callable mock. Now if __call__ is in the spec the mock is callable
Diffstat (limited to 'devel/py-mock')
-rw-r--r--devel/py-mock/Makefile4
-rw-r--r--devel/py-mock/distinfo8
2 files changed, 6 insertions, 6 deletions
diff --git a/devel/py-mock/Makefile b/devel/py-mock/Makefile
index b7c3dc21963..11ac74c235b 100644
--- a/devel/py-mock/Makefile
+++ b/devel/py-mock/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.3 2012/10/31 11:19:32 asau Exp $
+# $NetBSD: Makefile,v 1.4 2012/12/02 13:12:28 wen Exp $
#
-DISTNAME= mock-0.8.0
+DISTNAME= mock-1.0.1
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= devel
MASTER_SITES= http://pypi.python.org/packages/source/m/mock/
diff --git a/devel/py-mock/distinfo b/devel/py-mock/distinfo
index 230ea84ee70..25c390a7555 100644
--- a/devel/py-mock/distinfo
+++ b/devel/py-mock/distinfo
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.2 2012/02/16 21:45:18 gls Exp $
+$NetBSD: distinfo,v 1.3 2012/12/02 13:12:28 wen Exp $
-SHA1 (mock-0.8.0.tar.gz) = 28cbecea9abcc2c88e3e0cd47c793c6d112eddfc
-RMD160 (mock-0.8.0.tar.gz) = 1ce268be84b8182331d4fba29b40dfd7d1b60c34
-Size (mock-0.8.0.tar.gz) = 749663 bytes
+SHA1 (mock-1.0.1.tar.gz) = ba2b1d5f84448497e14e25922c5e3293f0a91c7e
+RMD160 (mock-1.0.1.tar.gz) = 94205e392a5228d3732674ba96d5a75976da7d92
+Size (mock-1.0.1.tar.gz) = 818644 bytes