(self)
| 41 | class 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 = [] |
nothing calls this directly
no test coverage detected