MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_timer_repr

Method test_timer_repr

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

cancelMethod · 0.95
reprFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected