Bug report
I expect this to raise a TimeoutError:
async def amain():
async with asyncio.timeout(-11):
await asyncio.sleep(0)
asyncio.run(amain())
Instead I have to add an extra asyncio.sleep(0) to get a TimeoutError
async def amain():
async with asyncio.timeout(-11):
await asyncio.sleep(0) # does not raise CancelledError
await asyncio.sleep(0) # raises CancelledError
asyncio.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