-
Notifications
You must be signed in to change notification settings - Fork 106
Closed
Description
When using mock.patch.multiple as a decorator (class or test method), the mocks it creates are passed in as keyword arguments to the test function.
Unfortunately, this is not compatible with expand, as the standalone functions that it generates (parameterized.parameterized.param_as_standalone_func.standalone_func) only take unnamed positional arguments.
The simplest fix seems to be to just add unnamed keyword arguments as well:
@wraps(func)
def standalone_func(*a, **k):
return func(*(a + p.args), **p.kwargs, **k)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels