Let's say we have the following functions:
async def x1():
print("inside x1")
async def x2():
print("inside x2")
async def main():
await x1()
x2()
await asyncio.sleep(5)
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
I will get a warning of the following:
RuntimeWarning: coroutine 'x2' was never awaited
Are there any way to make Python raises an error instead of just printing a warning?