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

Method test_timer_repr

Lib/test/test_asyncio/test_events.py:2612–2624  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

cancelMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected