Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_uses_copy_of_methods(self):
l = [lambda: 42]
mc = _MultiCall(l, {})
repr(mc)
l[:] = []
res = mc.execute()
return res == 42
def MC(self, methods, kwargs, firstresult=False):
hookfuncs = []
for method in methods:
f = HookImpl(None, "", method, method.example_impl)
hookfuncs.append(f)
return _MultiCall(hookfuncs, kwargs, {"firstresult": firstresult})