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

Method test_enter

Lib/test/test_sched.py:43–50  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

41class TestCase(unittest.TestCase):
42
43 def test_enter(self):
44 l = []
45 fun = lambda x: l.append(x)
46 scheduler = sched.scheduler(time.time, time.sleep)
47 for x in [0.5, 0.4, 0.3, 0.2, 0.1]:
48 z = scheduler.enter(x, 1, fun, (x,))
49 scheduler.run()
50 self.assertEqual(l, [0.1, 0.2, 0.3, 0.4, 0.5])
51
52 def test_enterabs(self):
53 l = []

Callers

nothing calls this directly

Calls 4

assertEqualMethod · 0.95
appendMethod · 0.45
enterMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected