(self)
| 2610 | |
| 2611 | |
| 2612 | def test_timer_repr(self): |
| 2613 | self.loop.get_debug.return_value = False |
| 2614 | |
| 2615 | # simple function |
| 2616 | h = asyncio.TimerHandle(123, noop, (), self.loop) |
| 2617 | src = test_utils.get_function_source(noop) |
| 2618 | self.assertEqual(repr(h), |
| 2619 | '<TimerHandle when=123 noop() at %s:%s>' % src) |
| 2620 | |
| 2621 | # cancelled handle |
| 2622 | h.cancel() |
| 2623 | self.assertEqual(repr(h), |
| 2624 | '<TimerHandle cancelled when=123>') |
| 2625 | |
| 2626 | def test_timer_repr_debug(self): |
| 2627 | self.loop.get_debug.return_value = True |
nothing calls this directly
no test coverage detected