[TIP] Which mock object framework should I use?

Grig Gheorghiu grig at gheorghiu.net
Sat Nov 17 12:49:39 PST 2007


You can add Mocker <http://labix.org/mocker> to the list. Looks very
well documented and thought out.

Grig

--- Martin Aspeli <optilude at gmx.net> wrote:

> Hi all,
> 
> I'd like to use a mock objects library to mock out services. So far, 
> I've seen:
> 
>   - pymock
>   - python-mock
>   - pMock
>   - minimock
>   - Mocky
> 
> 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 
> recommendations?
> 
> Thanks,
> Martin
> 
> -- 
> Author of `Professional Plone Development`, a book for developers who
> want to work with Plone. See http://martinaspeli.net/plone-book
> 
> 
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
> 




More information about the testing-in-python mailing list