def test_ncycles(self): it = iters.ncycles([10, 11], 2) self.assertEqual(10, next(it)) self.assertEqual(11, next(it)) self.assertEqual(10, next(it)) self.assertEqual(11, next(it)) self.assertRaises(StopIteration, next, it)
def test_ncycles(self): it = iters.ncycles([10,11], 2) self.assertEqual(10, next(it)) self.assertEqual(11, next(it)) self.assertEqual(10, next(it)) self.assertEqual(11, next(it)) self.assertRaises(StopIteration, next, it)