We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
test_async_gen_asyncio_gc_aclose_09
1 parent 52beebc commit ccd4862Copy full SHA for ccd4862
Lib/test/test_asyncgen.py
@@ -1058,8 +1058,7 @@ async def gen():
1058
while True:
1059
yield 1
1060
finally:
1061
- await asyncio.sleep(0.01)
1062
+ await asyncio.sleep(0)
1063
DONE = 1
1064
1065
async def run():
@@ -1069,7 +1068,10 @@ async def run():
1069
1068
del g
1070
gc_collect() # For PyPy or other GCs.
1071
1072
- await asyncio.sleep(0.1)
+ # Starts running the aclose task
1073
+ # For asyncio.sleep(0) in finally block
1074
1075
1076
self.loop.run_until_complete(run())
1077
self.assertEqual(DONE, 1)
0 commit comments