8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54d0118 commit 169294eCopy full SHA for 169294e
Lib/test/test_asyncio/test_tasks.py
@@ -1010,11 +1010,12 @@ def gen():
1010
1011
def test_wait_for_cancellation_race_condition(self):
1012
async def inner():
1013
- await asyncio.wait_for(asyncio.sleep(1), timeout=2)
+ with contextlib.suppress(asyncio.CancelledError):
1014
+ await asyncio.sleep(1)
1015
return 1
1016
1017
async def main():
- result = await asyncio.wait_for(inner(), timeout=1)
1018
+ result = await asyncio.wait_for(inner(), timeout=.01)
1019
assert result == 1
1020
1021
asyncio.run(main())
0 commit comments