merge in current default
This commit is contained in:
@@ -1841,7 +1841,13 @@ def getfuncargnames(function, startindex=None):
|
||||
if startindex is None:
|
||||
startindex = inspect.ismethod(function) and 1 or 0
|
||||
if realfunction != function:
|
||||
startindex += len(getattr(function, "patchings", []))
|
||||
mock = sys.modules.get('mock')
|
||||
if mock is not None:
|
||||
for patching in getattr(function, "patchings", []):
|
||||
if not patching.attribute_name and patching.new is mock.DEFAULT:
|
||||
startindex += 1
|
||||
else:
|
||||
startindex += len(getattr(function, "patchings", []))
|
||||
function = realfunction
|
||||
argnames = inspect.getargs(py.code.getrawcode(function))[0]
|
||||
defaults = getattr(function, 'func_defaults',
|
||||
|
||||
Reference in New Issue
Block a user