You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- track everything in method_calls, eg:
>>> m = Mock()
>>> m()
<Mock ...>
>>> m.method_calls
[('__call__',)]
...so I don't have to check m.call_args_list *and* m.method_calls to make
sure that nothing has been called on m itself that shouldn't have been.
Original issue reported on code.google.com by cwith...@gmail.com on 9 Dec 2008 at 12:54
That should be straightforward to add.
I can also add child return value calls as well - which gets you halfway to
issue 9.
Suggested output:
>>> m = Mock()
>>> m().something().other()
>>> m.method_calls
[('__call__', (), {}), ('().something', (), {}), ('().something().other', (),
{})]
The question is whether this would pollute method calls too much for people who
prefer to track them separately? (Adding '__call__' is straightforward - it is
the
extension of this that I wonder about.)
Original comment by fuzzyman on 9 Dec 2008 at 12:26
Original issue reported on code.google.com by
cwith...@gmail.com
on 9 Dec 2008 at 12:54The text was updated successfully, but these errors were encountered: