[TIP] ANN: mock 0.7.0 release candidate 1
Michael Foord
michael at voidspace.org.uk
Fri Feb 25 06:25:35 PST 2011
Hello all,
Whilst we're on the topic of mocking libraries...
I've made a new release of mock: mock 0.7.0 rc1
http://pypi.python.org/pypi/mock
This is intended to be the last release of mock before 0.7.0 final and
the only changes anticipated are documentation changes which I've
finally started work on.
Changelog:
http://www.voidspace.org.uk/python/mock/changelog.html#version-0-7-0-rc-1
Changes since beta 4:
* Tested with jython, pypy and Python 3.2 and 3.1
* Decorated functions / methods have their docstring and __module__
preserved on Python 2.4
* BUGFIX: mock.patch now works correctly with certain types of objects
that proxy attribute access, like the django settings object
* BUGFIX: reset_mock caused infinite recursion when a mock is set as its
own return value
mock is a Python library for simple mocking and patching (replacing
objects with mocks during test runs). The "headline features" in 0.7.0
are Python 3 support and the ability to mock magic methods. You can
now mock objects that behave like containers or are used as context
managers. mock is designed for use with unittest, based on the "action
-> assertion" pattern rather than "record -> replay". People are
happily using mock with Python test frameworks like nose and py.test.
0.7.0 is a major new release with a bunch of other new features and
bugfixes as well.
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)
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