Bug report
I expect this to raise a TimeoutError:
asyncdefamain():
asyncwithasyncio.timeout(-11):
awaitasyncio.sleep(0)
asyncio.run(amain())
Instead I have to add an extra asyncio.sleep(0) to get a TimeoutError
asyncdefamain():
asyncwithasyncio.timeout(-11):
awaitasyncio.sleep(0) # does not raise CancelledErrorawaitasyncio.sleep(0) # raises CancelledErrorasyncio.run(amain())
Your environment
- CPython versions tested on:
- Operating system and architecture:
Bug report
I expect this to raise a TimeoutError:
Instead I have to add an extra
asyncio.sleep(0)to get a TimeoutErrorYour environment