示例#1
0
 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)
示例#2
0
文件: tests.py 项目: Gizmo707/fn.py
 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)