def test_lfilter(self): func = lambda x: x lst = list(builtins.range(10)) results = lfilter(lambda x: x, lst), lengths = 9, expecteds = list(builtins.filter(func, lst)), self.check_results(results, expecteds, lengths)
def test_filter(self): func = lambda x: x lst = list(builtins.range(10)) actual1 = filter(func, lst) actual2 = lfilter(func, lst) actual = [actual1, actual2], lengths = 9, expected = list(builtins.filter(func, lst)), self.check_result(actual, expected, lengths)