[TIP] Mock 0.8rc2 and a couple of mock recipes

Michael Foord michael at voidspace.org.uk
Fri Jan 13 12:54:22 PST 2012

Hey all,

I did a new release of mock 0.8, fixing the issue reported here by Tom Davis and an api change to create_autospec to make it consistent with other parts of the mock api.

Details of mock 0.8rc2 here:


A recipe for a DeletingMock, where deleting attributes causes future access to those attributes to raise an AttributeError:


A recipe for super simple mocking of open as a context manager:


All the best,

Michael Foord


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 mailing list