We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 68391f8 commit 45d0725Copy full SHA for 45d0725
Lib/test/test_asyncio/test_waitfor.py
@@ -237,8 +237,8 @@ async def inner():
237
with self.assertRaises(FooException):
238
await foo()
239
240
- @unittest.skip("TODO")
241
async def test_wait_for_self_cancellation(self):
+ loop = asyncio.get_running_loop()
242
async def inner():
243
try:
244
await asyncio.sleep(0.3)
@@ -257,7 +257,6 @@ async def inner():
257
# Test that wait_for itself is properly cancellable
258
# even when the initial task holds up the initial cancellation.
259
task = asyncio.create_task(wait)
260
- await asyncio.sleep(0.2)
261
task.cancel()
262
263
with self.assertRaises(asyncio.CancelledError):
0 commit comments