Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:

To add to this mock.Mock also copies dir(spec) but creating an instance from 
mock doesn't copy it where it's not a problem with create_autospec. Mock with 
spec does only attribute validation whereas create_autospec does signature 
validation. There is another open issue to make mock use spec passed as if it's 
autospecced issue30587 where this could be used as a data point to change API. 
I am adding mock devs for confirmation.

----------
nosy: +cjw296, mariocj89, michael.foord
versions: +Python 3.8

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

Reply via email to