Change by Claudiu Belu :
--
versions: -Python 3.8
___
Python tracker
<https://bugs.python.org/issue32153>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Claudiu Belu :
If an object's attribute is a partial function, mock.create_autospec will fail
while trying to copy the partial functions' details to the mocked function, as
the partial function does not have the __name__ attribute.
Example:
import functools
Change by Claudiu Belu :
--
keywords: +patch
pull_requests: +4412
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32092>
___
___
Py
Change by Claudiu Belu :
--
keywords: +patch
pull_requests: +4411
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue30587>
___
___
Py
Claudiu Belu added the comment:
Currently, the autospec=True argument can be passed to mock.patch, but when
trying to make assertions on the call and its arguments, it can fail, as it
expects an instance / class instance reference as the first argument (self /
cls arguments are not consumed
Change by Claudiu Belu :
--
components: +Library (Lib)
___
Python tracker
<https://bugs.python.org/issue32092>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Claudiu Belu :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue32092>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Claudiu Belu :
Currently, the autospec=True argument can be passed to mock.patch, but when
trying to make assertions on the call and its arguments, it can fail, as it
expects an instance / class instance reference as the first argument (self /
cls arguments are not
New submission from Claudiu Belu:
Mock can accept a spec object / class as argument, making sure that accessing
attributes that do not exist in the spec will cause an AttributeError to be
raised, but there is no guarantee that the spec's methods signatures are
respected in any way.