EasyMock for python ?
Ben Finney
bignose+hates-spam at benfinney.id.au
Fri Oct 12 05:39:05 EDT 2007
(Please don't send me personal copies of messages that are sent to the
forum; I read via the newsgroup, and it's annoying to also get replies
in email when I didn't send an email message.)
"Simon Brunning" <simon at brunningonline.net> writes:
> On 10/12/07, Ben Finney <bignose+hates-spam at benfinney.id.au> wrote:
> > 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.
>
> Now *that* is what the OP was talking about - that's not a Mock,
> that's a Stub. See <http://tinyurl.com/26hfjd>.
Because the minimock.Mock instance is instrumented to emit a message
any time one of its attributes is called, that output becomes the
playback — which then, using doctest, can be compared against the
*expected* sequence of method calls.
That seems like it's a Mock to me: intended to assert that a specific
sequence of method calls with specific arguments was made on the mock
instance.
--
\ "I love to go down to the schoolyard and watch all the little |
`\ children jump up and down and run around yelling and screaming. |
_o__) They don't know I'm only using blanks." -- Emo Philips |
Ben Finney
More information about the Python-list
mailing list