mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Merge
This commit is contained in:
commit
5d1f6c3b15
3 changed files with 9 additions and 0 deletions
|
@ -2103,6 +2103,8 @@ def create_autospec(spec, spec_set=False, instance=False, _parent=None,
|
|||
elif is_type and instance and not _instance_callable(spec):
|
||||
Klass = NonCallableMagicMock
|
||||
|
||||
_name = _kwargs.pop('name', _name)
|
||||
|
||||
_new_name = _name
|
||||
if _parent is None:
|
||||
# for a top level object no _new_name should be set
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue