MCPcopy Index your code
hub / github.com/python/cpython / test_cycle

Method test_cycle

Lib/test/test_itertools.py:627–632  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

625 self.test_count_threading(step=5)
626
627 def test_cycle(self):
628 self.assertEqual(take(10, cycle('abc')), list('abcabcabca'))
629 self.assertEqual(list(cycle('')), [])
630 self.assertRaises(TypeError, cycle)
631 self.assertRaises(TypeError, cycle, 5)
632 self.assertEqual(list(islice(cycle(gen3()),10)), [0,1,2,0,1,2,0,1,2,0])
633
634 def test_groupby(self):
635 # Check whether it accepts arguments correctly

Callers

nothing calls this directly

Calls 5

takeFunction · 0.85
listClass · 0.85
gen3Function · 0.85
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected