launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #02627
Re: Writing stubs made easy
Jeroen Vermeulen wrote:
> Greetings fellow hackers,
[...]
> A FakeMethod can take the place of any function or method, and:
>
> - Return a constant value.
> - Raise an exception instead.
> - Tell you how many times it's been invoked.
This looks handy. Although, in my ideal world it'd be called
StubMethod, to be more consistent with the terminology for test doubles
described in <http://www.martinfowler.com/bliki/TestDouble.html>.
-Andrew.
Follow ups
References