[TIP] flexmock for Python

Kumar McMillan kumar.mcmillan at gmail.com
Wed Nov 24 10:35:46 PST 2010


On Wed, Nov 24, 2010 at 7:27 AM, Herman Sheremetyev <herman at swebpage.com> wrote:
> To give a few reasons why you might be interested, here's a list of
> currently supported features:
>
> - unittest.TestCase integration
> - automatic expectation checking on tearDown
> - should_receive()
> - with_args() ['with' is reserved in python]
> - times() [as well as once, twice and never aliases]
> - and_return()
> - and_raise()
> - overriding new instances (on new-style objects)
> - parameter shortcuts for with_args/and_return
> - at_least/at_most expectation modifiers
> - proxying/spying using the pass_thru expectation modifier
>
> More complete usage docs available at:
>
> https://github.com/has207/flexmock/wiki/Documentation
>
> It's still evolving as I'm adding more features, but I'd be really
> interested in any feedback from the community.

Hi Herman.
I'm not a heavy Ruby user but I think FlexMock has a great API.  In
fact, the API of Ruby's Mocha is pretty much identical.  I thought
Mocha made for very readible and concise mocking code so I created
Fudge for Python http://farmdev.com/projects/fudge/

I was very hesitant to introduce yet another mocking library and
attempted to justify my efforts here:
http://farmdev.com/projects/fudge/why-fudge.html

However, I like that people are generous enough to release so many
mocking libraries to the Python community.

-Kumar

>
> Cheers,
>
> -Herman
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
>



More information about the testing-in-python mailing list