[TIP] [ANN] CaptureMock 0.1 - honestly not just yet another mocking framework!

Geoff Bache geoff.bache at gmail.com
Fri Mar 25 01:54:33 PDT 2011

On Fri, Mar 25, 2011 at 9:45 AM, Herman Sheremetyev <herman at swebpage.com> wrote:
> On Fri, Mar 25, 2011 at 4:57 PM, Geoff Bache <geoff.bache at gmail.com> wrote:
>> Hi Herman,
>> I don't really understand why you think I have created a new test
>> runner. Yes, there is a new flag (environment variable) to decide
>> whether to record or replay, but that's about all the test runner
>> features I can see, and that doesn't impact at all on whatever test
>> runner you're using. Perhaps you could explain a bit more what you
>> mean here?
> It's quite possible I misunderstand how capturemock is supposed to
> work. From skimming the docs earlier it seemed like there was a
> command you have to run to process your tests to record the
> interactions and then replay them. To me that looks like it would
> require some test runner type functionality.

Not really. There is no pre-processing involved. There are just two
ways to run your tests, controlled by the environment variable
CAPTUREMOCK_MODE. You just write your tests in your test runner of
choice as you would if you weren't mocking anything and add a
capturemock decorator. And you then run them as normal, with or
without that environment variable set according to preference.

What is considered "test runner type functionality" is of course open
to discussion. Perhaps the important point is that I can't see how
this is Yet Another anything :) As far as I'm aware, there is nothing
else out there that is at all similar. If I thought there was, I
wouldn't have written it...


More information about the testing-in-python mailing list