EasyMock for python ?

Simon Brunning simon at brunningonline.net
Thu Oct 11 10:26:40 EDT 2007


On 10/10/07, BlueBird <phil 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.html I 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...

-- 
Cheers,
Simon B.
simon at brunningonline.net
http://www.brunningonline.net/simon/blog/
GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues



More information about the Python-list mailing list