

def test_filter(self):
    res = _(['foo', 'hello', 'bar', 'world']).filter((lambda x, *args: (len(x) > 3)))
    self.assertEqual(['hello', 'world'], res, "filter didn't work")
    res = _(['foo', 'hello', 'bar', 'world']).select((lambda x, *args: (len(x) > 3)))
    self.assertEqual(['hello', 'world'], res, "select didn't work")

dataset/ETHPy150Open serkanyersen/underscore.py/tests/test_collections.py TestCollections.test_filter/original