EasyMock for python ?

BlueBird phil at freehackers.org
Fri Oct 12 06:59:01 EDT 2007


On Oct 11, 4:26 pm, "Simon Brunning" <si... at brunningonline.net> wrote:
> On 10/10/07, BlueBird <p... at freehackers.org> wrote:
>
> > Does anybody know where to find a library like EasyMock for python ? I
> > searched quickly but could not find anything.
>
> > I found python-mocks on sourceforge but form quickly reading the docs,
> > it is not an EasyMock style mock. Actually, according to
> >http://martinfowler.com/articles/mocksArentStubs.htmlI don't think it
> > is even a mock library. More a stub.
>
> python-mock is more jMock than EasyMock in style, it's true, and the
> fact that you define expectations *after* the test invocation rather
> than before does feel a bit odd. But it does indeed check against the
> defined expectations, so that makes it a mock library in my book.
>
> A record-playback EasyMock style mock library would be nice, it's true...

It should not be that hard to do, given that python-mocks already has
the notion of recording and expectation verifiation.

I may give it a stab.

   Philippe





More information about the Python-list mailing list