23 lines
306 B
Python
23 lines
306 B
Python
import asyncio
|
|
|
|
import pytest
|
|
|
|
from zvk.event.consumer import on_startup
|
|
|
|
|
|
@on_startup
|
|
async def kamikaze(bot):
|
|
bot.die()
|
|
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_do_commit_die(bot):
|
|
bot.event_queue.register_consumer(kamikaze)
|
|
assert await bot.run()
|
|
|
|
|
|
def test_nonasync(bot):
|
|
asyncio.run(bot.run())
|
|
|
|
|