[TIP] Mocking frameworks

Kumar McMillan kumar.mcmillan at gmail.com
Fri Apr 9 13:08:47 PDT 2010

On Sat, Apr 3, 2010 at 5:08 PM, Kev <kevin.p.dwyer at gmail.com> wrote:
> Hello List,
> I've been googling python mocking frameworks recently to find one that
> provides similar functionality, in terms of expectations, to Jmock2.
> Does anyone know which python mocking frameworks provide such
> functionality,

I like the idea of Jmock and I also like the simplicity of Mocha, a
Ruby module inspired by Jmock.  So I created Fudge for Python

However, unlike Jmock you only have to be as strict as you want in
your declaration of intent.  In other words, you don't have to specify
arguments or even their types if you don't want to, although you can
(to a degree).

> and where the staste of the art is at the moment?

this is a heavy question :)

all I know is that when I did research before writing Fudge, I
couldn't find anything that let me work in a declarative manner.  I
prefer this declarative manner over the postmortem approach (e.g.
Mock) because it usually raises exceptions that point directly to the
culprit.  I of course have stolen some cool patching and decorator
ideas from Mock though :)

> Cheers,
> Kev
> _______________________________________________
> 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