When using argument matchers, the match will fail if the argument is not equal to anything. For instance, the following will fail:
class NeverEqual(object): def eq(self, other): return False obj = NeverEqual() fake = fudge.Fake().expects('save').with_args(arg.any_value()) fake.save(obj) }}}
whereas I would expect the above to pass.
I've fixed this by changing the order that arguments are tested for equality (essentially changed from actual == expected to expected == actual). Patch (including tests) attached.
Personally, I'm not sure that overloading equality to do argument matching is the best approach, but there again I haven't exactly had much experience in writing mocking frameworks!