EasyMock for python ?

Ben Finney bignose+hates-spam at benfinney.id.au
Thu Oct 11 22:28:30 EDT 2007


BlueBird <phil at freehackers.org> writes:

> Does anybody know where to find a library like EasyMock for python ?

I've had good results with Ian Bicking's 'minimock.py'
<URL:http://blog.ianbicking.org/minimock.html>. It uses the existing
'doctest' functionality for its output, and a minimock.Mock will mock
*everything* (using further Mock instances for attributes and methods)
unless explicitly told otherwise.

This means that the Mock object automatically supports any number of
attributes and methods by any reasonable names; the only setup needed
beyond creating the instance is to seed it with anything you *don't*
want returned as a Mock.

-- 
 \           "Laugh and the world laughs with you; snore and you sleep |
  `\                                             alone."  -- Anonymous |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list