def test_filter(self):
        assert list(filter(lambda x:x>0, [-1, -2, 1, 2])) == [1, 2]
        
        code = 'f1 = lambda x: x>0\n'
        assert evalpy(code + 'for x in filter(f1, [-1, -2, 0, 1, 2]): print(x)') == '1\n2'
        assert evalpy(code + 'for x in filter(None, [-1, -2, 0, 1, 2]): print(x)') == '-1\n-2\n1\n2'
dataset/ETHPy150Open zoofIO/flexx/flexx/pyscript/tests/test_parser3.py/TestOtherBuildins.test_filter/original