Fix unittest.mock._Call: don't ignore name

Issue #28961: Fix unittest.mock._Call helper: don't ignore the name parameter
anymore.

Patch written by Jiajun Huang.
This commit is contained in:
Victor Stinner 2017-01-06 18:15:51 +01:00
parent 9505b03bb0
commit 84b6fb0eea
3 changed files with 18 additions and 2 deletions

View file

@ -1961,9 +1961,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)