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