summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Foord <michael@voidspace.org.uk>2012-10-07 18:00:10 +0100
committerMichael Foord <michael@voidspace.org.uk>2012-10-07 18:00:10 +0100
commita1e169b895a82806666be0cbb78ca44ceb8b4080 (patch)
tree03b90a0d8d112c94ffe22bb32c88fcde12b7f2f2
parent434f5b54dc2cf1e5aa7cbe1b4204559d8badb69e (diff)
downloadmock-a1e169b895a82806666be0cbb78ca44ceb8b4080.tar.gz
Updates for the 1.0 release
-rw-r--r--README.txt2
-rw-r--r--docs/changelog.txt41
-rw-r--r--docs/index.txt6
-rw-r--r--mock.py2
-rw-r--r--tox.ini7
5 files changed, 52 insertions, 6 deletions
diff --git a/README.txt b/README.txt
index 91515ba..93ee824 100644
--- a/README.txt
+++ b/README.txt
@@ -15,7 +15,7 @@ The mock module also provides utility functions / objects to assist with
testing, particularly monkey patching.
* `PDF documentation for 1.0 beta 1
- <http://www.voidspace.org.uk/downloads/mock-1.0b1.pdf>`_
+ <http://www.voidspace.org.uk/downloads/mock-1.0.0.pdf>`_
* `mock on google code (repository and issue tracker)
<http://code.google.com/p/mock/>`_
* `mock documentation
diff --git a/docs/changelog.txt b/docs/changelog.txt
index 3459727..06a5080 100644
--- a/docs/changelog.txt
+++ b/docs/changelog.txt
@@ -4,6 +4,47 @@
CHANGELOG
=========
+2012/10/07 Version 1.0.0
+------------------------
+
+No changes since 1.0.0 beta 1. This version has feature parity with
+`unittest.mock <
+http://docs.python.org/py3k/library/unittest.mock.html#module-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
+
+
2012/07/13 Version 1.0.0 beta 1
--------------------------------
diff --git a/docs/index.txt b/docs/index.txt
index 1f233d0..6705f69 100644
--- a/docs/index.txt
+++ b/docs/index.txt
@@ -7,11 +7,11 @@
:Author: `Michael Foord
<http://www.voidspace.org.uk/python/weblog/index.shtml>`_
:Version: |release|
-:Date: 2012/07/13
+:Date: 2012/10/07
:Homepage: `Mock Homepage`_
:Download: `Mock on PyPI`_
:Documentation: `PDF Documentation
- <http://www.voidspace.org.uk/downloads/mock-1.0b1.pdf>`_
+ <http://www.voidspace.org.uk/downloads/mock-1.0.0.pdf>`_
:License: `BSD License`_
:Support: `Mailing list (testing-in-python@lists.idyll.org)
<http://lists.idyll.org/listinfo/testing-in-python>`_
@@ -102,7 +102,7 @@ then please contact us.
* `mock on PyPI <http://pypi.python.org/pypi/mock>`_
* `mock documentation as PDF
- <http://www.voidspace.org.uk/downloads/mock-1.0b1.pdf>`_
+ <http://www.voidspace.org.uk/downloads/mock-1.0.0.pdf>`_
* `Google Code Home & Mercurial Repository <http://code.google.com/p/mock/>`_
.. index:: repository
diff --git a/mock.py b/mock.py
index 93b90d8..1be4e6e 100644
--- a/mock.py
+++ b/mock.py
@@ -30,7 +30,7 @@ __all__ = (
)
-__version__ = '1.0b1'
+__version__ = '1.0.0'
import pprint
diff --git a/tox.ini b/tox.ini
index d5a5557..554f870 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist = py24,py25,py26,py27,py31,pypy,py32,jython
+envlist = py24,py25,py26,py27,py31,pypy,py32,py33,jython
[testenv]
deps=unittest2
@@ -31,5 +31,10 @@ commands=
{envbindir}/python -m unittest discover []
deps =
+[testenv:py33]
+commands=
+ {envbindir}/python -m unittest discover []
+deps =
+
# note for jython. Execute in tests directory:
# rm `find . -name '*$py.class'` \ No newline at end of file