def test_is_generator(self): gen = permutations() self.assertIn('__init__', dir(gen)) self.assertIn('__next__', dir(gen))
def test_is_generator_iterable(): gen = permutations() assert '__init__' in dir(gen) assert '__next__' in dir(gen)