[TIP] ANN: mock 0.7.2 released
Michael Foord
michael at voidspace.org.uk
Mon May 30 13:32:06 PDT 2011
Hey all,
It has been more than a week since the release of a new Python mocking
library, so I thought I'd do a new release of mock.
There's a new minor release of mock, version 0.7.2, with two bugfixes in it.
* http://pypi.python.org/pypi/mock/ (download)
* http://www.voidspace.org.uk/python/mock/ (documentation)
* https://code.google.com/p/mock/ (repo and issue tracker)
mock is a Python library for simple mocking and patching (replacing
objects with mocks during test runs). mock is designed for use with
unittest,
based on the "action -> assertion" pattern rather than "record -> replay".
The full changelog for this release is:
http://www.voidspace.org.uk/python/mock/changelog.html#version-0-7-2
* BUGFIX: instances of list subclasses can now be used as mock specs
* BUGFIX: MagicMock equality / inequality protocol methods changed to
use the
default equality / inequality. This is done through a `side_effect` on
the mocks used for `__eq__` / `__ne__`
The most important change is the second one, which fixes an oddity with
the way equality comparisons with MagicMock work(ed). For more details
on this change, and the motivation behind it, see this blog entry:
http://www.voidspace.org.uk/python/weblog/arch_d7_2011_05_28.shtml#e1216
The blog entry also gives a hint about new features in the
coming-soon-I-sort-of-promise 0.8 alpha 1 release of mock. (The
changelog shown is for the features *already* in the hg repo, so feel
free to "check it out".)
All the best,
Michael Foord
--
http://www.voidspace.org.uk/
May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html
More information about the testing-in-python
mailing list