Closed GoogleCodeExporter closed 9 years ago
Actually patch can be used with new_callable and arbitrary keyword arguments -
the keyword arguments are passed to new_callable when the patch is started.
spec and spec_set are special because they are unlikely to be useful to any
new_callable *except* a mock. However, one use case maybe to create a wrapper
function that delegates to a real mock.
Original comment by fuzzyman
on 23 Jan 2012 at 1:35
I don't think the failure message is confusing - I think it's the right error
message and as the comment above notes there are legitimate reasons to *want*
to do this so forbidding it would be unhelpful.
Original comment by fuzzyman
on 19 Nov 2013 at 3:54
Original issue reported on code.google.com by
fuzzyman
on 22 Jan 2012 at 10:33