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 a1ba0e5 commit 45d9963Copy full SHA for 45d9963
Lib/test/test_asyncgen.py
@@ -1057,8 +1057,7 @@ async def gen():
1057
while True:
1058
yield 1
1059
finally:
1060
- await asyncio.sleep(0.01)
1061
+ await asyncio.sleep(0)
1062
DONE = 1
1063
1064
async def run():
@@ -1068,7 +1067,10 @@ async def run():
1068
1067
del g
1069
gc_collect() # For PyPy or other GCs.
1070
1071
- await asyncio.sleep(0.1)
+ # Starts running the aclose task
1072
+ # For asyncio.sleep(0) in finally block
1073
1074
1075
self.loop.run_until_complete(run())
1076
self.assertEqual(DONE, 1)
0 commit comments