[TIP] ANN: Fudge 1.0 - YAMF (yet another mock framework)

Kumar McMillan kumar.mcmillan at gmail.com
Fri Feb 25 14:19:51 PST 2011


Everyone else is doing it, right?!  Mock testing tools abound!
http://farmdev.com/thoughts/90/fudge-goes-1-0/
http://farmdev.com/projects/fudge/

Fudge has come along way since its 0.9.0 release in late 2009.  As the
flexmock docs point out, one of its major flaws in 0.9 was that you
had to manage setup/teardown so that expectations got verified.  Since
1.0 that is no longer the case.  The docs above explain how it works
but as a spoiler: I basically stole mock's @patch method.  I always
liked the way @patch worked but never thought it would add much value
to Fudge.  Then one day, while working on a mock based suite [1], it
dawned on me that this would be a perfect way to seamlessly inject
fudge's verification step.  Unlike flexmock it requires a decorator
but also unlike flexmock it doesn't couple you to your test runner.

[1] Mock is by far the most pervasive mock testing tool.  People love
it so much that I often lose the vote when trying to introduce Fudge
into a new project :)  I like mock too but I really don't like
postmortem inspection and wanted more direct tracebacks.

Kumar



More information about the testing-in-python mailing list