[TIP] Which mock object framework should I use?
optilude at gmx.net
Sat Nov 17 11:06:30 PST 2007
I'd like to use a mock objects library to mock out services. So far,
Some of these (the last two) are doctest-only propositions as far as I
can see, in that they basically print stuff that you then verify. I can
see how that's useful, but I'd also like something more explicit, where
I can make declarations about which methods I expect to be called, in
which order, with particular arguments and returning particular values.
From a brief glance, pymock looks nice in that it's based on EasyMock,
which I've used in Java. I could imagine using a combination of this and
minimock in doctests.
Has anyone done a more thorough evaluation and come up with any
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book
More information about the testing-in-python