[TIP] mock 0.8 rc1: performance improvements and bugfixes
michael at voidspace.org.uk
Thu Dec 29 05:34:44 PST 2011
A late christmas present (or nuisance depending on your point of view...), I've released mock 0.8 release candidate 1. The main changes in this release are performance improvements and a couple of bugfixes.
mock is a library for testing in Python. It allows you to replace parts of your system under test with mock objects. The latest stable release is 0.7.2, which you can download from pypi.
You can download the new release candidate or install it with:
pip install -U mock==dev
Full details here:
Changelog for this release:
• create_autospec on the return value of a mock class will use __call__ for the signature rather than __init__
• Performance improvement instantiating Mock and MagicMock
• Mocks used as magic methods have the same type as their parent instead of being hardcoded to MagicMock
Special thanks to Julian Berman for his help with diagnosing and improving performance in this release. I have started work on the doc changes and I'm hoping that the 0.8 final release won't be too far off.
As always please try out the new release. I'm considering making this release a "proper" pypi release, so that it is the default version installed by pip. I consider mock 0.8 to now be production ready, modulo the fact that there is still a lot of doc work to do. I'll see how far I get on the doc work in the remainder of the Christmas break.
All the best,
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
More information about the testing-in-python