def test_filter_even(self): self.assertEqual((2, 4, 6), tuple( list_ops.filter_clone(lambda x: x % 2 == 0, [1, 2, 3, 4, 5, 6])))
def test_filter_nonempty_list(self): self.assertEqual( list_ops.filter_clone(lambda x: x % 2 == 1, [1, 2, 3, 4, 5]), [1, 3, 5])
def test_filter_odd(self): self.assertEqual((1, 3, 5), tuple( list_ops.filter_clone(lambda x: x % 2 != 0, [1, 2, 3, 4, 5, 6])))
def test_filter_empty_list(self): self.assertEqual(list_ops.filter_clone(lambda x: x % 2 == 1, []), [])
def test_filter_even(self): self.assertEqual( (2, 4, 6), tuple(list_ops.filter_clone(lambda x: x % 2 == 0, [1, 2, 3, 4, 5, 6])) )
def test_filter_odd(self): self.assertEqual( (1, 3, 5), tuple(list_ops.filter_clone(lambda x: x % 2 != 0, [1, 2, 3, 4, 5, 6])) )