

def test_reduce(self, space):
    w_res = space.execute('\n        return [1, 2, 4, 8].reduce(0) do |accum, cur|\n          accum + cur\n        end\n        ')
    assert (space.int_w(w_res) == 15)

dataset/ETHPy150Open topazproject/topaz/tests/modules/test_enumerable.py TestEnumberable.test_reduce/original