summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/mock.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2017-02-26 13:06:11 (GMT)
committerGitHub <noreply@github.com>2017-02-26 13:06:11 (GMT)
commit6b585fddc9ad472d8c962aba26cf25809451b2b5 (patch)
tree3e683b83e864886d59c14b06426ddbce612b957d /Lib/unittest/mock.py
parent4c784632f7cb5ede6df4b1b20cdfae155069a81b (diff)
downloadcpython-6b585fddc9ad472d8c962aba26cf25809451b2b5.zip
cpython-6b585fddc9ad472d8c962aba26cf25809451b2b5.tar.gz
cpython-6b585fddc9ad472d8c962aba26cf25809451b2b5.tar.bz2
Fix unittest.mock._Call: don't ignore name (#307)
Issue #28961: Fix unittest.mock._Call helper: don't ignore the name parameter anymore. Patch written by Jiajun Huang. (cherry picked from commits 84b6fb0eea29b3b28a1a11124526b01ec0c9d17a and dea1536fd3a8424d537794cd53715df0989cbbe1) Conflicts: Misc/NEWS
Diffstat (limited to 'Lib/unittest/mock.py')
-rw-r--r--Lib/unittest/mock.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py
index 9bc40bc..99658d4 100644
--- a/Lib/unittest/mock.py
+++ b/Lib/unittest/mock.py
@@ -1945,9 +1945,8 @@ class _Call(tuple):
If the _Call has no name then it will match any name.
"""
- def __new__(cls, value=(), name=None, parent=None, two=False,
+ def __new__(cls, value=(), name='', parent=None, two=False,
from_kall=True):
- name = ''
args = ()
kwargs = {}
_len = len(value)