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

It's supposed to raise an AttributeError if the attribute is not present. The 
previous case was that magicmethods were not wrapped returning configured 
values. So this conflicts with the documentation returning a default value when 
not present instead of raising an AttributeError.

wraps: Item for the mock object to wrap. If wraps is not None then calling the 
Mock will pass the call through to the wrapped object (returning the real 
result). Attribute access on the mock will return a Mock object that wraps the 
corresponding attribute of the wrapped object (so attempting to access an 
attribute that doesn’t exist will raise an AttributeError).

----------

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

Reply via email to