

def test_invoke(self):
    res = _(['foo', 'bar']).invoke((lambda x, *args: x.upper()))
    self.assertEqual(['FOO', 'BAR'], res, 'invoke with lambda did not work')
    res = _(['foo', 'bar']).invoke('upper')
    self.assertEqual(['FOO', 'BAR'], x, 'invoke with name did not work')

dataset/ETHPy150Open serkanyersen/underscore.py/tests/test_collections.py TestCollections.test_invoke/VarMisuse@79/113 `res`->`x`