MCPcopy Create free account
hub / github.com/eternnoir/pyTelegramBotAPI / driver

Function driver

tests/test_async_telebot.py:61–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59 bot.close_session = noop # stub: no real aiohttp session in tests
60
61 async def driver():
62 await bot._process_polling(non_stop=True, interval=0, timeout=0)
63 # Allow the fire-and-forget task to finish plus one yield for the
64 # add_done_callback discard to run. A timeout guards against the
65 # stub ever being rewired such that the processing task never runs.
66 await asyncio.wait_for(process_completed.wait(), timeout=1)
67 await asyncio.sleep(0)
68
69 asyncio.run(driver())
70

Calls 2

_process_pollingMethod · 0.80
waitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…