def test_filter(self):
        a = range(10)
        def is_odd(x):
            return x % 2 == 1
        self.assertNotEqual(type(filter(is_odd, a)), list)
        self.assertEqual(list(filter(is_odd, a)), [1, 3, 5, 7, 9])
dataset/ETHPy150Open PythonCharmers/python-future/tests/test_future/test_common_iterators.py/TestIterators.test_filter/original