Matthew Suozzo <msuo...@google.com> added the comment:

A few more things:

Assertions on Mock-autospec'ed Mocks will silently pass since e.g. 
assert_called_once_with will now be mocked out. This may justify a more 
stringent stance on the pattern since it risks hiding real test failures.

One complicating factor with the implementation is that autospec'd objects may 
have children that are already Mocked out. Failing eagerly, however, would 
break cases where the child is never used (and consequently risk causing more 
friction than may be necessary) but failing only upon access of that child 
makes it trickier for the user to trace back to where the parent was mocked.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43478>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to