aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/unittest/mock.py
diff options
context:
space:
mode:
authorKushal Das <kushaldas@gmail.com>2014-04-16 01:22:52 +0530
committerKushal Das <kushaldas@gmail.com>2014-04-16 01:22:52 +0530
commit5d1f6c3b15435749002e2f08e8d88812a328c0e5 (patch)
tree86bf08ce7f90fea2c2d0cd00ba5270d44b130f4d /Lib/unittest/mock.py
parenta3b99a07e6d75d707b5c8a0cadb6b059638da650 (diff)
parent484f8a875b986690f9d8aec2089368b70184e009 (diff)
downloadcpython-5d1f6c3b15435749002e2f08e8d88812a328c0e5.tar.gz
cpython-5d1f6c3b15435749002e2f08e8d88812a328c0e5.zip
Merge
Diffstat (limited to 'Lib/unittest/mock.py')
-rw-r--r--Lib/unittest/mock.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py
index 2dd4ca5271a..e8dbc222c90 100644
--- a/Lib/unittest/mock.py
+++ b/Lib/unittest/mock.py
@@ -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