ANN: mock 0.7.2 released

Fuzzyman fuzzyman at gmail.com
Mon May 30 22:26:50 CEST 2011


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

Michael Foord


More information about the Python-announce-list mailing list