pyinvoke/invoke — pull request #199 by sophacles (2014-12-09 19:13:34+00:00)
Title: Make Task ok with MethodType tasks

This updates the argspec to allow for the body of the task to be a
method from an object instance, rather than just a function or a
__call__. For the most part it is pretty straight forward, however the
way the executor._call_objs() test method set things up created a
wierdness in light of accepting methods.

Blindly poping the "first" argument of mock.__call__ pretended self
was the ctx arg - not OK. Rather we needed to create some simple
task functions that proxied to a Mock object to allow for proper
semantics.