[TIP] Which mock object framework should I use?
tarjei at nu.no
Sun Nov 18 07:59:18 PST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Gustavo Niemeyer wrote:
> Hello Martin,
>>> You can add Mocker <http://labix.org/mocker> to the list. Looks
>>> very well documented and thought out.
>> Ah yes, an omission from my side, I had actually looked at it. I
>> agree it looks good, but I'd appreciate any pointers to practical
> You won't find many pointers for practical experience with Mocker
> yet, as I've released it publicly only a week ago or so. Even
> then, I do believe it has a superset of the features of all the
> others, and a few more, in a well packed way.
> Please let me know if you have any questions or suggestions about
I come from a mainly php background to the Python world, and I've
mainly been using the pmock library for mocking.
Since you are working on a new Mock implementation, my wishlist is
that you look at the api that is used by the simpletest package
(simpletest.org) for mocking.
What I like about the simpletest api is that it doesn't require too
Instead of : (example from pmock)
you can have:
obj.expectOnce('some_method', ('myparam','otherparam'), 'tt')
Which is IMHO both more readable and easier to work with.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python